register for the right event on firefox
authorDan Mills <thunder@mozilla.com>
Tue, 23 Dec 2008 11:18:37 -0800
changeset 45129 74cadf00907ae3e541b40f50248d97d0090bde9e
parent 45128 c5fac5771b6d05573b7971981f11a96680e360bc
child 45130 b8d1e4d0b3d221427f53780c2d5d06476bcbc521
push idunknown
push userunknown
push dateunknown
register for the right event on firefox
services/sync/Weave.js
--- a/services/sync/Weave.js
+++ b/services/sync/Weave.js
@@ -46,17 +46,17 @@ WeaveService.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIObserver,
                                          Components.interfaces.nsISupportsWeakReference]),
 
   observe: function BSS__observe(subject, topic, data) {
     switch (topic) {
     case "app-startup":
       let os = Components.classes["@mozilla.org/observer-service;1"].
         getService(Components.interfaces.nsIObserverService);
-      os.addObserver(this, "profile-after-change", true);
+      os.addObserver(this, "sessionstore-windows-restored", true);
       break;
    /* The following event doesn't exist on Fennec; for Fennec loading, see
     * fennec-weave-overlay.js.
     */
     case "sessionstore-windows-restored":
       Components.utils.import("resource://weave/service.js");
       Weave.Service.onStartup();
       break;