Bug 666790 - addon download progress doorhanger has error when asking permission to install [r=gavin]
authorPaul O’Shannessy <paul@oshannessy.com>
Tue, 28 Jun 2011 11:03:00 -0700
changeset 71933 7313d4e3547f1abc2d2428b20abbfce698e52ef6
parent 71932 3b245f7f94d7fbcc652a08544d7993713d44b050
child 71934 3890c438f22d9e2aab4ce04954d31b1cabed7128
push id291
push userposhannessy@mozilla.com
push dateTue, 28 Jun 2011 18:03:37 +0000
treeherdermozilla-inbound@7313d4e3547f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs666790
milestone7.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 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
@@ -996,17 +996,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._updateProgressTimeout = setTimeout(this.updateProgress.bind(this), 0);
       ]]></constructor>
 
       <destructor><![CDATA[
         this.destroy();
       ]]></destructor>
 
       <field name="progressmeter" readonly="true">
         document.getAnonymousElementByAttribute(this, "anonid", "progressmeter");
@@ -1023,16 +1023,17 @@
         utils.DownloadUtils;
       </field>
 
       <method name="destroy">
         <body><![CDATA[
           this.notification.options.installs.forEach(function(aInstall) {
             aInstall.removeListener(this);
           }, this);
+          clearTimeout(this._updateProgressTimeout);
         ]]></body>
       </method>
 
       <method name="setProgress">
         <parameter name="aProgress"/>
         <parameter name="aMaxProgress"/>
         <body><![CDATA[
           if (aMaxProgress == -1) {