Bug 294260 followup: add a comment explaining why we need to call trackStartupCrashEnd on quit-application-granted, r=MattN
authorGavin Sharp <gavin@gavinsharp.com>
Sat, 08 Feb 2014 13:04:31 -0800
changeset 170842 432a8750016a7e86eb577ece6369fd2003cc0e16
parent 170841 efa293b9889326903c65166569a788565c2a4d77
child 170843 a87aa6c6ea6b76a48b26071b94dee449caca01dd
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersMattN
bugs294260
milestone30.0a1
Bug 294260 followup: add a comment explaining why we need to call trackStartupCrashEnd on quit-application-granted, r=MattN
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -633,16 +633,19 @@ BrowserGlue.prototype = {
 
   /**
    * Application shutdown handler.
    */
   _onQuitApplicationGranted: function () {
     // This pref must be set here because SessionStore will use its value
     // on quit-application.
     this._setPrefToSaveSession();
+
+    // Call trackStartupCrashEnd here in case the delayed call on startup hasn't
+    // yet occurred (see trackStartupCrashEnd caller in browser.js).
     try {
       let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
                          .getService(Ci.nsIAppStartup);
       appStartup.trackStartupCrashEnd();
     } catch (e) {
       Cu.reportError("Could not end startup crash tracking in quit-application-granted: " + e);
     }