зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1356826: Part 6 - Wait for delayed startup before checking for side-loads. r=aswan
MozReview-Commit-ID: IpuRNbdUXmE --HG-- extra : rebase_source : 5ac9b960f9f06952120676b713d77624f832e4d6
This commit is contained in:
Родитель
5a09f33f66
Коммит
01a97bf1e9
|
@ -1143,6 +1143,11 @@ addEventListener("DOMContentLoaded", function onDCL() {
|
|||
gBrowser.updateBrowserRemoteness(initBrowser, gMultiProcessBrowser);
|
||||
});
|
||||
|
||||
let _resolveDelayedStartup;
|
||||
var delayedStartupPromise = new Promise(resolve => {
|
||||
_resolveDelayedStartup = resolve;
|
||||
});
|
||||
|
||||
var gBrowserInit = {
|
||||
delayedStartupFinished: false,
|
||||
|
||||
|
@ -1619,6 +1624,7 @@ var gBrowserInit = {
|
|||
|
||||
this.delayedStartupFinished = true;
|
||||
|
||||
_resolveDelayedStartup();
|
||||
Services.obs.notifyObservers(window, "browser-delayed-startup-finished");
|
||||
TelemetryTimestamps.add("delayedStartupFinished");
|
||||
},
|
||||
|
|
|
@ -35,7 +35,7 @@ this.ExtensionsUI = {
|
|||
sideloadListener: null,
|
||||
histogram: null,
|
||||
|
||||
init() {
|
||||
async init() {
|
||||
this.histogram = Services.telemetry.getHistogramById("EXTENSION_INSTALL_PROMPT_RESULT");
|
||||
|
||||
Services.obs.addObserver(this, "webextension-permission-prompt");
|
||||
|
@ -43,6 +43,8 @@ this.ExtensionsUI = {
|
|||
Services.obs.addObserver(this, "webextension-install-notify");
|
||||
Services.obs.addObserver(this, "webextension-optional-permission-prompt");
|
||||
|
||||
await RecentWindow.getMostRecentBrowserWindow().delayedStartupPromise;
|
||||
|
||||
this._checkForSideloaded();
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче