зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1055212 - Use Cu.import everywhere we import pageActions.jsm r=margaret
This commit is contained in:
Родитель
0e1907f34b
Коммит
4c716f1ca5
|
@ -2737,7 +2737,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PageActions",
|
|||
Cu.reportError(err);
|
||||
|
||||
let sandbox = {};
|
||||
Services.scriptloader.loadSubScript(script, sandbox);
|
||||
Cu.import(script, sandbox);
|
||||
return sandbox[exprt];
|
||||
});
|
||||
});
|
||||
|
|
|
@ -48,12 +48,11 @@ var PageActions = {
|
|||
_maybeUninit: function() {
|
||||
if (this._inited && Object.keys(this._items).length == 0) {
|
||||
this._inited = false;
|
||||
Services.obs.removeObserver(this, "PageActions:Clicked", false);
|
||||
Services.obs.removeObserver(this, "PageActions:LongClicked", false);
|
||||
Services.obs.removeObserver(this, "PageActions:Clicked");
|
||||
Services.obs.removeObserver(this, "PageActions:LongClicked");
|
||||
}
|
||||
},
|
||||
|
||||
// These observes are registered to lazily initialize this in browser.js
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
if (aTopic == "PageActions:Clicked") {
|
||||
if (this._items[aData].clickCallback) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче