diff --git a/dom/messages/SystemMessageManager.js b/dom/messages/SystemMessageManager.js index 44e6a93e7af..10e97ea9f1c 100644 --- a/dom/messages/SystemMessageManager.js +++ b/dom/messages/SystemMessageManager.js @@ -136,7 +136,6 @@ SystemMessageManager.prototype = { dispatchers[aType] = { handler: aHandler, messages: [], isHandling: false }; // Ask for the list of currently pending messages. - this.addMessageListeners("SystemMessageManager:GetPendingMessages:Return"); cpmm.sendAsyncMessage("SystemMessageManager:GetPendingMessages", { type: aType, uri: this._uri, @@ -215,8 +214,6 @@ SystemMessageManager.prototype = { manifest: this._manifest, uri: this._uri, msgID: msg.msgID }); - } else if (aMessage.name == "SystemMessageManager:GetPendingMessages:Return") { - this.removeMessageListeners(aMessage.name); } let messages = (aMessage.name == "SystemMessageManager:Message") @@ -251,7 +248,8 @@ SystemMessageManager.prototype = { // nsIDOMGlobalPropertyInitializer implementation. init: function sysMessMgr_init(aWindow) { debug("init"); - this.initDOMRequestHelper(aWindow, ["SystemMessageManager:Message"]); + this.initDOMRequestHelper(aWindow, ["SystemMessageManager:Message", + "SystemMessageManager:GetPendingMessages:Return"]); let principal = aWindow.document.nodePrincipal; this._isInBrowserElement = principal.isInBrowserElement;