mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1496773 - Part 2: Route Marionette startup via new "marionette-startup-requested" notification. r=ato
This just adds a layer of indirection between existing startup paths and a new startup path that GeckoView(-consumers) will exploit. Differential Revision: https://phabricator.services.mozilla.com/D17579 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
813f94bb19
commit
2b09060ef2
@ -333,6 +333,7 @@ class MarionetteParentProcess {
|
||||
Services.obs.addObserver(this, "sessionstore-windows-restored");
|
||||
Services.obs.addObserver(this, "mail-startup-done");
|
||||
Services.obs.addObserver(this, "toplevel-window-ready");
|
||||
Services.obs.addObserver(this, "marionette-startup-requested");
|
||||
|
||||
for (let [pref, value] of EnvironmentPrefs.from(ENV_PRESERVE_PREFS)) {
|
||||
Preferences.set(pref, value);
|
||||
@ -363,8 +364,7 @@ class MarionetteParentProcess {
|
||||
Services.obs.removeObserver(this, topic);
|
||||
|
||||
Services.obs.addObserver(this, "xpcom-will-shutdown");
|
||||
this.finalUIStartup = true;
|
||||
this.init();
|
||||
Services.obs.notifyObservers(this, "marionette-startup-requested");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -388,8 +388,7 @@ class MarionetteParentProcess {
|
||||
|
||||
// Thunderbird only, instead of sessionstore-windows-restored.
|
||||
case "mail-startup-done":
|
||||
this.finalUIStartup = true;
|
||||
this.init();
|
||||
Services.obs.notifyObservers(this, "marionette-startup-requested");
|
||||
break;
|
||||
|
||||
case "sessionstore-windows-restored":
|
||||
@ -411,12 +410,16 @@ class MarionetteParentProcess {
|
||||
Services.obs.addObserver(this, "domwindowclosed");
|
||||
} else {
|
||||
Services.obs.addObserver(this, "xpcom-will-shutdown");
|
||||
this.finalUIStartup = true;
|
||||
this.init();
|
||||
Services.obs.notifyObservers(this, "marionette-startup-requested");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "marionette-startup-requested":
|
||||
this.finalUIStartup = true;
|
||||
this.init();
|
||||
break;
|
||||
|
||||
case "xpcom-will-shutdown":
|
||||
Services.obs.removeObserver(this, "xpcom-will-shutdown");
|
||||
this.uninit();
|
||||
|
Loading…
Reference in New Issue
Block a user