Bug 1155253 - Back out 304f87a54059 due to a startup regression. r=me
authorDoug Turner <doug.turner@gmail.com>
Thu, 16 Apr 2015 11:57:34 -0700
changeset 239641 5782e3653c5d001a8647cb9b194229810f5805b4
parent 239640 3f4103872afc5a20a75adcbcdbf499479ca7bf1f
child 239642 913ce28d019658d56aba583f8de24fbff7e636f6
push id12444
push userryanvm@gmail.com
push dateFri, 17 Apr 2015 20:04:42 +0000
treeherderfx-team@560a202db924 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1155253
milestone40.0a1
Bug 1155253 - Back out 304f87a54059 due to a startup regression. r=me
dom/push/PushServiceLauncher.js
--- a/dom/push/PushServiceLauncher.js
+++ b/dom/push/PushServiceLauncher.js
@@ -25,16 +25,19 @@ PushServiceLauncher.prototype = {
 
   observe: function observe(subject, topic, data) {
     switch (topic) {
       case "app-startup":
         Services.obs.addObserver(this, "final-ui-startup", true);
         break;
       case "final-ui-startup":
         Services.obs.removeObserver(this, "final-ui-startup");
+        if (!Services.prefs.getBoolPref("dom.push.enabled")) {
+          return;
+        }
 
         let isParent = Cc["@mozilla.org/xre/runtime;1"]
                        .getService(Ci.nsIXULRuntime)
                        .processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
 
         if (isParent) {
           Cu.import("resource://gre/modules/PushService.jsm");
           PushService.init();