Attachment #8690542: Possible patch for bug #1226742

View | Details | Raw Unified | Return to bug 1226742
Collapse All | Expand All

(-)a/suite/common/src/nsSuiteGlue.js (+7 lines)
Line     Link Here 
 Lines 249-264   SuiteGlue.prototype = { Link Here 
249
        var ss = Services.search;
249
        var ss = Services.search;
250
        if (ss.currentEngine.name == ss.defaultEngine.name)
250
        if (ss.currentEngine.name == ss.defaultEngine.name)
251
          return;
251
          return;
252
        if (data == "engine-current")
252
        if (data == "engine-current")
253
          ss.defaultEngine = ss.currentEngine;
253
          ss.defaultEngine = ss.currentEngine;
254
        else
254
        else
255
          ss.currentEngine = ss.defaultEngine;
255
          ss.currentEngine = ss.defaultEngine;
256
        break;
256
        break;
257
      case "notifications-open-settings":
258
        // Since this is a web notification, there's probably a browser window.
259
        var mostRecentBrowserWindow = Services.wm.getMostRecentWindow("navigator:browser");
260
        if (mostRecentBrowserWindow)
261
          mostRecentBrowserWindow.toDataManager("|permissions");
262
        break;
257
      case "timer-callback":
263
      case "timer-callback":
258
        // Load the Login Manager data from disk off the main thread, some time
264
        // Load the Login Manager data from disk off the main thread, some time
259
        // after startup.  If the data is required before the timeout, for example
265
        // after startup.  If the data is required before the timeout, for example
260
        // because a restored page contains a password field, it will be loaded on
266
        // because a restored page contains a password field, it will be loaded on
261
        // the main thread, and this initialization request will be ignored.
267
        // the main thread, and this initialization request will be ignored.
262
        Services.logins;
268
        Services.logins;
263
        break;
269
        break;
264
    }
270
    }
 Lines 314-329   SuiteGlue.prototype = { Link Here 
314
    Services.obs.addObserver(this, "weave:service:ready", true);
320
    Services.obs.addObserver(this, "weave:service:ready", true);
315
    Services.obs.addObserver(this, "weave:engine:clients:display-uri", true);
321
    Services.obs.addObserver(this, "weave:engine:clients:display-uri", true);
316
    Services.obs.addObserver(this, "session-save", true);
322
    Services.obs.addObserver(this, "session-save", true);
317
    Services.obs.addObserver(this, "dl-done", true);
323
    Services.obs.addObserver(this, "dl-done", true);
318
    Services.obs.addObserver(this, "places-init-complete", true);
324
    Services.obs.addObserver(this, "places-init-complete", true);
319
    Services.obs.addObserver(this, "places-database-locked", true);
325
    Services.obs.addObserver(this, "places-database-locked", true);
320
    Services.obs.addObserver(this, "places-shutdown", true);
326
    Services.obs.addObserver(this, "places-shutdown", true);
321
    Services.obs.addObserver(this, "browser-search-engine-modified", true);
327
    Services.obs.addObserver(this, "browser-search-engine-modified", true);
328
    Services.obs.addObserver(this, "notifications-open-settings", true);
322
    Services.prefs.addObserver("devtools.debugger.", this, true);
329
    Services.prefs.addObserver("devtools.debugger.", this, true);
323
    Components.classes['@mozilla.org/docloaderservice;1']
330
    Components.classes['@mozilla.org/docloaderservice;1']
324
              .getService(Components.interfaces.nsIWebProgress)
331
              .getService(Components.interfaces.nsIWebProgress)
325
              .addProgressListener(this, Components.interfaces.nsIWebProgress.NOTIFY_LOCATION);
332
              .addProgressListener(this, Components.interfaces.nsIWebProgress.NOTIFY_LOCATION);
326
  },
333
  },
327
334
328
  // profile is available
335
  // profile is available
329
  _onProfileAfterChange: function()
336
  _onProfileAfterChange: function()

Return to bug 1226742