Bug 898170 - Don't remove listeners after their message manager is gone (r=felipe)
authorBill McCloskey <wmccloskey@mozilla.com>
Fri, 26 Jul 2013 14:26:40 -0700
changeset 152500 3aef6df154540cc214bf586aeca5527942aac4df
parent 152499 676ae4615bda332fe757917aaa39c3fe01cbddab
child 152501 be0befd009cb1b598531025b16f3ee375ee46655
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs898170
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 898170 - Don't remove listeners after their message manager is gone (r=felipe)
toolkit/content/widgets/remote-browser.xml
toolkit/modules/RemoteWebProgress.jsm
--- a/toolkit/content/widgets/remote-browser.xml
+++ b/toolkit/content/widgets/remote-browser.xml
@@ -77,17 +77,16 @@
           this.messageManager.addMessageListener("DOMTitleChanged", this);
           this.messageManager.loadFrameScript("chrome://global/content/browser-child.js", true);
           this.webProgress._init();
         ]]>
       </constructor>
 
       <destructor>
         <![CDATA[
-          this.messageManager.removeMessageListener("DOMTitleChanged", this);
           this.webProgress._destroy();
         ]]>
       </destructor>
 
       <method name="receiveMessage">
         <parameter name="aMessage"/>
         <body><![CDATA[
           let json = aMessage.json;
--- a/toolkit/modules/RemoteWebProgress.jsm
+++ b/toolkit/modules/RemoteWebProgress.jsm
@@ -48,20 +48,16 @@ RemoteWebProgress.prototype = {
   _init: function WP_Init() {
     this._browser.messageManager.addMessageListener("Content:StateChange", this);
     this._browser.messageManager.addMessageListener("Content:LocationChange", this);
     this._browser.messageManager.addMessageListener("Content:SecurityChange", this);
     this._browser.messageManager.addMessageListener("Content:StatusChange", this);
   },
 
   _destroy: function WP_Destroy() {
-    this._browser.messageManager.removeMessageListener("Content:StateChange", this);
-    this._browser.messageManager.removeMessageListener("Content:LocationChange", this);
-    this._browser.messageManager.removeMessageListener("Content:SecurityChange", this);
-    this._browser.messageManager.removeMessageListener("Content:StatusChange", this);
     this._browser = null;
   },
 
   get isLoadingDocument() { return this._isDocumentLoading },
   get DOMWindow() { return this._DOMWindow; },
   get DOMWindowID() { return 0; },
   get isTopLevel() { return this._isTopLevel; },