Bug 666790 - addon download progress doorhanger has error when asking permission to install [r=gavin]
authorPaul O’Shannessy <paul@oshannessy.com>
Thu, 23 Jun 2011 16:37:24 -0700
changeset 71916 7d3d5b9710eaa9efa5e077b8844ad7ff8919e4a6
parent 71915 9de9b3a9458ceb0004459e228e8d9d9f436acb0b
child 71917 34a9652019ffaa9c8c72a4d042a000d66c6dd1ec
child 71927 f459af6a2a8e5c7f31aec5ba8ebfe0a4007e2372
push id209
push userbzbarsky@mozilla.com
push dateTue, 05 Jul 2011 17:42:16 +0000
treeherdermozilla-aurora@cc6e30cce8af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs666790
milestone7.0a1
Bug 666790 - addon download progress doorhanger has error when asking permission to install [r=gavin]
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -990,17 +990,17 @@
         }, this);
 
         // Calling updateProgress can sometimes cause this notification to be
         // removed in the middle of refreshing the notification panel which
         // makes the panel get refreshed again. Just initialise to the
         // undetermined state and then schedule a proper check at the next
         // opportunity
         this.setProgress(0, -1);
-        setTimeout(this.updateProgress.bind(this), 0);
+        this._timeout = setTimeout(this.updateProgress.bind(this), 0);
       ]]></constructor>
 
       <destructor><![CDATA[
         this.destroy();
       ]]></destructor>
 
       <field name="progressmeter" readonly="true">
         document.getAnonymousElementByAttribute(this, "anonid", "progressmeter");
@@ -1017,16 +1017,17 @@
         utils.DownloadUtils;
       </field>
 
       <method name="destroy">
         <body><![CDATA[
           this.notification.options.installs.forEach(function(aInstall) {
             aInstall.removeListener(this);
           }, this);
+          clearTimeout(this._timeout);
         ]]></body>
       </method>
 
       <method name="setProgress">
         <parameter name="aProgress"/>
         <parameter name="aMaxProgress"/>
         <body><![CDATA[
           if (aMaxProgress == -1) {