Bug 625612 - Add prominent startup info to development builds [r=wesj]
authorMark Finkle <mfinkle@mozilla.com>
Thu, 20 Jan 2011 14:21:55 -0500
changeset 67286 dd71bf06422881ea43967a409ab855a3ee2c71ae
parent 67285 dd70949c8c790ea9e3fe3be130a83323f847dfe7
child 67287 b07ea3f3ddd994ed20b187be5b8caa7cebf64fa6
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs625612
Bug 625612 - Add prominent startup info to development builds [r=wesj]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -510,16 +510,26 @@ var BrowserUI = {
       NewTabPopup.init();
 
 #ifdef MOZ_UPDATER
       // Check for updates in progress
       let updatePrompt = Cc["@mozilla.org/updates/update-prompt;1"].createInstance(Ci.nsIUpdatePrompt);
       updatePrompt.checkForUpdates();
 #endif
     }, false);
+
+#ifndef MOZ_OFFICIAL_BRANDING
+      setTimeout(function() {
+        let startup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup_MOZILLA_2_0).getStartupInfo();
+        for (let name in startup) {
+          if (name != "process")
+            Services.console.logStringMessage("[timing] " + name + ": " + (startup[name] - startup.process) + "ms");
+        }
+      }, 3000);
+#endif
   },
 
   uninit: function() {
     ExtensionsView.uninit();
     ConsoleView.uninit();
   },
 
   update: function(aState) {