Bug 1395795 - Convert RemoteController.jsm into a normal JS script in order to avoid paying the cost of wrapping the arrays passed in the arguments; r=Mossop

This commit is contained in:
Ehsan Akhgari 2017-08-31 23:22:34 -04:00
Родитель fcc7a3bf37
Коммит 530c747a80
3 изменённых файлов: 6 добавлений и 6 удалений

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

@ -384,8 +384,10 @@
Services.obs.addObserver(this, "browser:purge-session-history", true);
}
let jsm = "resource://gre/modules/RemoteController.jsm";
let RemoteController = Components.utils.import(jsm, {}).RemoteController;
let rc_js = "resource://gre/modules/RemoteController.js";
let scope = {};
Services.scriptloader.loadSubScript(rc_js, scope);
let RemoteController = scope.RemoteController;
this._controller = new RemoteController(this);
this.controllers.appendController(this._controller);
]]>

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

@ -3,8 +3,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
this.EXPORTED_SYMBOLS = ["RemoteController"];
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cu = Components.utils;

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

@ -121,7 +121,7 @@ with Files('PrivateBrowsingUtils.jsm'):
with Files('Promise*.jsm'):
BUG_COMPONENT = ('Toolkit', 'Async Tooling')
with Files('RemoteController.jsm'):
with Files('RemoteController.js'):
BUG_COMPONENT = ('Core', 'Widget')
with Files('RemoteFinder.jsm'):
@ -220,7 +220,7 @@ EXTRA_JS_MODULES += [
'Promise.jsm',
'PromiseMessage.jsm',
'PromiseUtils.jsm',
'RemoteController.jsm',
'RemoteController.js',
'RemoteFinder.jsm',
'RemotePageManager.jsm',
'RemoteSecurityUI.jsm',