зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1469774 - Error this.pageListener is undefined in AboutPrivateBrowsingHandler.jsm r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D23295 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3cce0a0fc6
Коммит
e74db02a2f
|
@ -10,6 +10,7 @@ const {RemotePages} = ChromeUtils.import("resource://gre/modules/remotepagemanag
|
|||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var AboutPrivateBrowsingHandler = {
|
||||
_inited: false,
|
||||
_topics: [
|
||||
"DontShowIntroPanelAgain",
|
||||
"OpenPrivateWindow",
|
||||
|
@ -21,9 +22,13 @@ var AboutPrivateBrowsingHandler = {
|
|||
for (let topic of this._topics) {
|
||||
this.pageListener.addMessageListener(topic, this.receiveMessage.bind(this));
|
||||
}
|
||||
this._inited = true;
|
||||
},
|
||||
|
||||
uninit() {
|
||||
if (!this._inited) {
|
||||
return;
|
||||
}
|
||||
for (let topic of this._topics) {
|
||||
this.pageListener.removeMessageListener(topic);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче