Bug 828780 - Ensure that closing a window via closing the last tab goes through the code path taken by closing the window directly; r=gavin a=lsblakk
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 15 Jan 2013 01:06:55 -0500
changeset 127152 e51b7b95574ca36145040aa4deb409c881a650e9
parent 127151 1fff5df1ac6a0f784b0e7e86bfc10ee76f94076c
child 127153 53807bd73c8a74105027fa486799ec16426859fd
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, lsblakk
bugs828780
milestone20.0a2
Bug 828780 - Ensure that closing a window via closing the last tab goes through the code path taken by closing the window directly; r=gavin a=lsblakk As a result, we make sure that the last-pb-context-exiting notification is correctly dispatched no matter how we close the last private window.
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1644,17 +1644,17 @@
                               this.tabContainer._closeWindowWithLastTab;
 
               // Closing the tab and replacing it with a blank one is notably slower
               // than closing the window right away. If the caller opts in, take
               // the fast path.
               if (closeWindow &&
                   aCloseWindowFastpath &&
                   this._removingTabs.length == 0 &&
-                  (this._windowIsClosing = window.closeWindow(true)))
+                  (this._windowIsClosing = window.closeWindow(true, window.warnAboutClosingWindow)))
                 return null;
 
               newTab = true;
             }
 
             aTab.closing = true;
             this._removingTabs.push(aTab);
             this._visibleTabs = null; // invalidate cache
@@ -1820,17 +1820,17 @@
               // Under the hood, a selectedIndex attribute controls which panel
               // is displayed. Removing a panel A which precedes the selected
               // panel B makes selectedIndex point to the panel next to B. We
               // need to explicitly preserve B as the selected panel.
               this.mTabBox.selectedPanel = selectedPanel;
             }
 
             if (aCloseWindow)
-              this._windowIsClosing = closeWindow(true);
+              this._windowIsClosing = closeWindow(true, window.warnAboutClosingWindow);
           ]]>
         </body>
       </method>
 
       <method name="_blurTab">
         <parameter name="aTab"/>
         <body>
           <![CDATA[