diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 6b5c3b0e8442..238e262dc0de 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -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]; }); }); diff --git a/mobile/android/modules/PageActions.jsm b/mobile/android/modules/PageActions.jsm index 5dadb3843682..9e7b04afebb0 100644 --- a/mobile/android/modules/PageActions.jsm +++ b/mobile/android/modules/PageActions.jsm @@ -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) {