Bug 1707823 - [devtools] Set will-navigate event listener before initializing inspector front. r=ochameau.

As the inspector front initialization is asynchronous and can take some time,
we might miss will-navigate events being emitted very early (e.g. when a new
navigation happen just after a previous one).

Differential Revision: https://phabricator.services.mozilla.com/D113481
This commit is contained in:
Nicolas Chevobbe 2021-04-29 05:10:13 +00:00
Родитель 1743e61c78
Коммит a12a47da9f
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -231,9 +231,8 @@ Inspector.prototype = {
return;
}
await this.initInspectorFront(targetFront);
targetFront.on("will-navigate", this._onBeforeNavigate);
await this.initInspectorFront(targetFront);
await Promise.all([
this._getCssProperties(),