Bug 620615 - New tab-modal alerts can make Firefox unable to quit (part 2). r=dolske, a=blocker
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Fri, 28 Jan 2011 17:21:00 -0800
changeset 61769 76b361ae1c3a5c78d59dc6c911d8de2be71ef41f
parent 61768 835b313007b49d24a8243dbddf070e65c9e59c01
child 61770 a55b45fb3d7c3753c4e240ccd2f239795abec46d
push id18480
push userjdolske@mozilla.com
push dateWed, 02 Feb 2011 03:46:14 +0000
treeherdermozilla-central@a55b45fb3d7c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske, blocker
bugs620615
milestone2.0b11pre
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 620615 - New tab-modal alerts can make Firefox unable to quit (part 2). r=dolske, a=blocker
toolkit/components/prompts/content/tabprompts.xml
--- a/toolkit/components/prompts/content/tabprompts.xml
+++ b/toolkit/components/prompts/content/tabprompts.xml
@@ -110,16 +110,17 @@
             // Anonymous wrapper used here because |Dialog| doesn't exist until init() is called!
             this.ui.checkbox.addEventListener("command", function() { self.Dialog.onCheckbox(); } , false);
             this.isLive = false;
         ]]>
         </constructor>
         <destructor>
         <![CDATA[
             if (this.isLive) {
+                this.Dialog.abortPrompt();
                 this.shutdownPrompt();
             }
         ]]>  
         </destructor>
 
         <field name="ui"/>
         <field name="args"/>
         <field name="linkedTab"/>
@@ -171,19 +172,19 @@
             <![CDATA[
                 // remove our event listeners
                 try {
                     window.removeEventListener("resize", this, false);
                     window.removeEventListener("unload", this, false);
                     this.linkedTab.removeEventListener("TabClose", this, false);
                     this.args.domWindow.removeEventListener("pagehide", this, false);
                 } catch(e) { }
+                this.isLive = false;
                 // invoke callback
                 this.onCloseCallback();
-                this.isLive = false;
             ]]>
             </body>
         </method>
 
         <method name="handleEvent">
             <parameter name="aEvent"/>
             <body>
             <![CDATA[