зеркало из 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 : 0fc72897bc0a12b5bd789c9a0d00df3dec4f7760 extra : source : d47998fa24cd084ffba07a73834d8ffb3af81b60
This commit is contained in:
Родитель
0adabf13c0
Коммит
84e0c25849
|
@ -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,
|
||||
|
||||
|
@ -1605,6 +1610,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();
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче