Bug 1387789: Convert ExtensionTabs.jsm to ext-tabs-base.js. r=mixedpuppy

This moves it to the same compartment as the code that it interfaces with the
most often, and allows for much more effective JIT optimizations.

MozReview-Commit-ID: FZcogI4d4rv

--HG--
rename : toolkit/components/extensions/ExtensionTabs.jsm => toolkit/components/extensions/ext-tabs-base.js
extra : rebase_source : 9928f7e36e4d65401ebb420dddfbcfcdbb11226f
This commit is contained in:
Kris Maglione 2017-08-05 18:42:01 -07:00
Родитель 24cb8efdec
Коммит 3ba231e141
6 изменённых файлов: 8 добавлений и 13 удалений

Просмотреть файл

@ -7,11 +7,11 @@
makeWidgetId:false, tabTracker:true, windowTracker:true */
/* import-globals-from ../../../toolkit/components/extensions/ext-toolkit.js */
/* globals TabBase, WindowBase, TabTrackerBase, WindowTrackerBase, TabManagerBase, WindowManagerBase */
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm");
Cu.import("resource://gre/modules/ExtensionTabs.jsm");
var {
ExtensionError,
defineLazyGetter,

Просмотреть файл

@ -6,7 +6,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm");
/* globals TabBase, WindowBase, TabTrackerBase, WindowTrackerBase, TabManagerBase, WindowManagerBase */
Cu.import("resource://gre/modules/ExtensionTabs.jsm");
/* globals EventDispatcher */
Cu.import("resource://gre/modules/Messaging.jsm");

Просмотреть файл

@ -5,11 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
/* exported TabTrackerBase, TabManagerBase, TabBase, WindowTrackerBase, WindowManagerBase, WindowBase */
var EXPORTED_SYMBOLS = ["TabTrackerBase", "TabManagerBase", "TabBase", "WindowTrackerBase", "WindowManagerBase", "WindowBase"];
/* globals EventEmitter */
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
@ -18,12 +14,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
XPCOMUtils.defineLazyModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/ExtensionUtils.jsm");
const {
var {
DefaultMap,
DefaultWeakMap,
EventEmitter,
ExtensionError,
defineLazyGetter,
getWinUtils,
@ -1847,3 +1840,5 @@ class WindowManagerBase {
}
/* eslint-enable valid-jsdoc */
}
Object.assign(global, {TabTrackerBase, TabManagerBase, TabBase, WindowTrackerBase, WindowManagerBase, WindowBase});

Просмотреть файл

@ -1,4 +1,5 @@
# scripts
category webextension-scripts tabs-base chrome://extensions/content/ext-tabs-base.js
category webextension-scripts toolkit chrome://extensions/content/ext-toolkit.js
category webextension-scripts-content toolkit chrome://extensions/content/ext-c-toolkit.js
category webextension-scripts-devtools toolkit chrome://extensions/content/ext-c-toolkit.js

Просмотреть файл

@ -24,6 +24,7 @@ toolkit.jar:
content/extensions/ext-proxy.js
content/extensions/ext-runtime.js
content/extensions/ext-storage.js
content/extensions/ext-tabs-base.js
content/extensions/ext-theme.js
content/extensions/ext-toolkit.js
content/extensions/ext-topSites.js

Просмотреть файл

@ -21,7 +21,6 @@ EXTRA_JS_MODULES += [
'ExtensionSettingsStore.jsm',
'ExtensionStorage.jsm',
'ExtensionStorageSync.jsm',
'ExtensionTabs.jsm',
'ExtensionUtils.jsm',
'LegacyExtensionsUtils.jsm',
'MessageChannel.jsm',