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 140239 3aef6df154540cc214bf586aeca5527942aac4df
parent 140238 676ae4615bda332fe757917aaa39c3fe01cbddab
child 140240 be0befd009cb1b598531025b16f3ee375ee46655
push id1951
push userryanvm@gmail.com
push dateSun, 28 Jul 2013 01:55:51 +0000
treeherderfx-team@73b69c146ca6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs898170
milestone25.0a1
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; },