diff --git a/services/sync/Weave.js b/services/sync/Weave.js index 6db75d883ea..cfa151d25e7 100644 --- a/services/sync/Weave.js +++ b/services/sync/Weave.js @@ -59,8 +59,13 @@ WeaveService.prototype = { break; case "final-ui-startup": - Cu.import("resource://weave/service.js"); - Weave.Service.onStartup(); + // 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://weave/service.js"); + } + }, 10000, Ci.nsITimer.TYPE_ONE_SHOT); break; } } diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index 5dd827c6de7..47cf262f1ec 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -253,8 +253,6 @@ WeaveSvc.prototype = { while (enum.hasMoreElements()) wait += enum.getNext().gBrowser.mTabs.length; break; - case FENNEC_ID: - wait = 10; } // Make sure we wait a little but but not too long in the worst case @@ -1523,3 +1521,6 @@ WeaveSvc.prototype = { } }, }; + +// Load Weave on the first time this file is loaded +Weave.Service.onStartup(); diff --git a/services/sync/modules/util.js b/services/sync/modules/util.js index 2c45580d477..6c94b6f1584 100644 --- a/services/sync/modules/util.js +++ b/services/sync/modules/util.js @@ -795,6 +795,7 @@ let Utils = { let Svc = {}; Svc.Prefs = new Preferences(PREFS_BRANCH); +Svc.Obs = Observers; [["Annos", "@mozilla.org/browser/annotation-service;1", "nsIAnnotationService"], ["AppInfo", "@mozilla.org/xre/app-info;1", "nsIXULAppInfo"], ["Bookmark", "@mozilla.org/browser/nav-bookmarks-service;1", "nsINavBookmarksService"],