Bug 1387249: If the add-on is installed at runtime don't wait for browser startup notifications. r?rexboy draft
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 03 Aug 2017 14:45:39 -0700
changeset 644187 41aa0a7d2e710004bdae82f0a336e992c596c6ea
parent 620769 a41c2b21ee54708b3ebd74fbe927824d2e847017
child 725523 b3d3f7317abb3a81c73cc18203e7788678fe037b
push id73343
push userdtownsend@mozilla.com
push dateThu, 10 Aug 2017 16:32:10 +0000
reviewersrexboy
bugs1387249
milestone57.0a1
Bug 1387249: If the add-on is installed at runtime don't wait for browser startup notifications. r?rexboy MozReview-Commit-ID: 1O1YD30gJbj
browser/extensions/onboarding/bootstrap.js
--- a/browser/extensions/onboarding/bootstrap.js
+++ b/browser/extensions/onboarding/bootstrap.js
@@ -191,17 +191,17 @@ function observe(subject, topic, data) {
 }
 
 function install(aData, aReason) {}
 
 function uninstall(aData, aReason) {}
 
 function startup(aData, aReason) {
   // Only start Onboarding when the browser UI is ready
-  if (aReason === APP_STARTUP || aReason === ADDON_INSTALL) {
+  if (Services.startup.startingUp) {
     Services.obs.addObserver(observe, BROWSER_READY_NOTIFICATION);
     Services.obs.addObserver(observe, BROWSER_SESSION_STORE_NOTIFICATION);
   } else {
     onBrowserReady();
     syncTourChecker.init();
   }
 }