Bug 587027 - Use as little memory as possible (part 5)
authorPhilipp von Weitershausen <philipp@weitershausen.de>
Wed, 25 Aug 2010 15:49:45 -0700
changeset 52159 04b3d9a96817602b9d4214af12dcb27c96fce6a5
parent 52158 cd4339510804697346a26b66c30d66512f0571ec
child 52160 5f3ccb35f8901169922feaae6cb9c2d8a04c6867
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs587027
Bug 587027 - Use as little memory as possible (part 5) Avoid accessing Weave.Service (=importing service.js) at all cost.
services/sync/Weave.js
--- a/services/sync/Weave.js
+++ b/services/sync/Weave.js
@@ -62,17 +62,19 @@ WeaveService.prototype = {
 
     case "final-ui-startup":
       this.addResourceAlias();
 
       // Force Weave service to load if it hasn't triggered from overlays
       this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
       this.timer.initWithCallback({
         notify: function() {
-          Cu.import("resource://services-sync/service.js");
+          Cu.import("resource://services-sync/main.js");
+          if (Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED)
+            Weave.Service;
         }
       }, 10000, Ci.nsITimer.TYPE_ONE_SHOT);
       break;
     }
   },
 
   addResourceAlias: function() {
     let ioService = Cc["@mozilla.org/network/io-service;1"]