Bug 1055212 - Use Cu.import everywhere we import pageActions.jsm r=margaret

This commit is contained in:
Wes Johnston 2014-08-25 16:19:32 -07:00
Родитель 0e1907f34b
Коммит 4c716f1ca5
2 изменённых файлов: 3 добавлений и 4 удалений

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

@ -2737,7 +2737,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PageActions",
Cu.reportError(err); Cu.reportError(err);
let sandbox = {}; let sandbox = {};
Services.scriptloader.loadSubScript(script, sandbox); Cu.import(script, sandbox);
return sandbox[exprt]; return sandbox[exprt];
}); });
}); });

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

@ -48,12 +48,11 @@ var PageActions = {
_maybeUninit: function() { _maybeUninit: function() {
if (this._inited && Object.keys(this._items).length == 0) { if (this._inited && Object.keys(this._items).length == 0) {
this._inited = false; this._inited = false;
Services.obs.removeObserver(this, "PageActions:Clicked", false); Services.obs.removeObserver(this, "PageActions:Clicked");
Services.obs.removeObserver(this, "PageActions:LongClicked", false); Services.obs.removeObserver(this, "PageActions:LongClicked");
} }
}, },
// These observes are registered to lazily initialize this in browser.js
observe: function(aSubject, aTopic, aData) { observe: function(aSubject, aTopic, aData) {
if (aTopic == "PageActions:Clicked") { if (aTopic == "PageActions:Clicked") {
if (this._items[aData].clickCallback) { if (this._items[aData].clickCallback) {