Bug 1349887 - Remove obsolete comment about non-existent _closedDuringPermitUnload flag. r?gijs draft
authorDão Gottwald <dao@mozilla.com>
Thu, 23 Mar 2017 11:12:13 +0100
changeset 503579 d01437e1761fe42491871a433c0d4a368c94e449
parent 503306 7513b3f42058e9bcf9950d4acf4647d4ad2240f0
child 550477 c1c2a7d801615f5e5dc4d116fc5a4edeaf723500
push id50628
push userdgottwald@mozilla.com
push dateThu, 23 Mar 2017 10:12:57 +0000
reviewersgijs
bugs1349887
milestone55.0a1
Bug 1349887 - Remove obsolete comment about non-existent _closedDuringPermitUnload flag. r?gijs MozReview-Commit-ID: ATYav9S2FGG
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2651,34 +2651,31 @@
               return false;
 
             var browser = this.getBrowserForTab(aTab);
 
             if (!aTab._pendingPermitUnload &&
                 !aSkipPermitUnload &&
                 aTab.linkedPanel &&
                 !aAdoptedByTab) {
+              TelemetryStopwatch.start("FX_TAB_CLOSE_PERMIT_UNLOAD_TIME_MS", aTab);
+
               // We need to block while calling permitUnload() because it
               // processes the event queue and may lead to another removeTab()
               // call before permitUnload() returns.
-
-              TelemetryStopwatch.start("FX_TAB_CLOSE_PERMIT_UNLOAD_TIME_MS", aTab);
-
               aTab._pendingPermitUnload = true;
               let {permitUnload, timedOut} = browser.permitUnload();
               delete aTab._pendingPermitUnload;
 
               TelemetryStopwatch.finish("FX_TAB_CLOSE_PERMIT_UNLOAD_TIME_MS", aTab);
 
               // If we were closed during onbeforeunload, we return false now
               // so we don't (try to) close the same tab again. Of course, we
               // also stop if the unload was cancelled by the user:
               if (aTab.closing || (!timedOut && !permitUnload)) {
-                // NB: deliberately keep the _closedDuringPermitUnload set to
-                // true so we keep exiting early in case of multiple calls.
                 return false;
               }
             }
 
 
             var closeWindow = false;
             var newTab = false;
             if (this.tabs.length - this._removingTabs.length == 1) {