Bug 1118747 - Delay GMPInstallManager initialization for 60 secs after delayed startup (matches Desktop) r=margaret
authorMark Finkle <mfinkle@mozilla.com>
Thu, 08 Jan 2015 14:16:17 -0500
changeset 248549 8e516e029c8e1ed988a6eb92f3e59032f9f2bd75
parent 248548 1b59426310d4e912d714ecf96c608c8b43092fd2
child 248550 a834419aaf6759fd27b884c2f3bfab07b32cf4dc
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1118747
milestone37.0a1
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 1118747 - Delay GMPInstallManager initialization for 60 secs after delayed startup (matches Desktop) r=margaret
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -364,24 +364,27 @@ var BrowserApp = {
     this.deck.addEventListener("DOMContentLoaded", function BrowserApp_delayedStartup() {
       try {
         BrowserApp.deck.removeEventListener("DOMContentLoaded", BrowserApp_delayedStartup, false);
         Services.obs.notifyObservers(window, "browser-delayed-startup-finished", "");
         Messaging.sendRequest({ type: "Gecko:DelayedStartup" });
 
         // Queue up some other performance-impacting initializations
         Services.tm.mainThread.dispatch(function() {
-          // Init LoginManager
           Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
+
           CastingApps.init();
+
+          // Delay this a minute because there's no rush
+          setTimeout(() => {
+            BrowserApp.gmpInstallManager = new GMPInstallManager();
+            BrowserApp.gmpInstallManager.simpleCheckAndInstall().then(null, () => {});
+          }, 1000 * 60);
         }, Ci.nsIThread.DISPATCH_NORMAL);
 
-        BrowserApp.gmpInstallManager = new GMPInstallManager();
-        BrowserApp.gmpInstallManager.simpleCheckAndInstall().then(null, () => {});
-
 #ifdef MOZ_SAFE_BROWSING
         Services.tm.mainThread.dispatch(function() {
           // Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
           SafeBrowsing.init();
         }, Ci.nsIThread.DISPATCH_NORMAL);
 #endif
 #ifdef NIGHTLY_BUILD
         WebcompatReporter.init();