зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1568150 - Stop spinning the event loop when destroying the inspector front. r=gl
InspectorFront.destroy isn't returning a promise. So the `await` in the toolbox code is not relevant and is only spinning the event loop. Removing it introduce races which should be fixed. The toolbox buttons shouldn't try to unhighlight if the inspector isn't used. Differential Revision: https://phabricator.services.mozilla.com/D39407 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2ce6e59528
Коммит
6b20f244f3
|
@ -273,8 +273,10 @@ class ToolboxToolbar extends Component {
|
||||||
ref: "frameMenuButton",
|
ref: "frameMenuButton",
|
||||||
title: description,
|
title: description,
|
||||||
onCloseButton: async () => {
|
onCloseButton: async () => {
|
||||||
await toolbox.initInspector();
|
// Only try to unhighlight if the highlighter has been started
|
||||||
toolbox.highlighter.unhighlight();
|
if (toolbox.highlighter) {
|
||||||
|
toolbox.highlighter.unhighlight();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
this.createFrameList
|
this.createFrameList
|
||||||
|
|
|
@ -3412,7 +3412,7 @@ Toolbox.prototype = {
|
||||||
|
|
||||||
// Temporary fix for bug #1493131 - inspector has a different life cycle
|
// Temporary fix for bug #1493131 - inspector has a different life cycle
|
||||||
// than most other fronts because it is closely related to the toolbox.
|
// than most other fronts because it is closely related to the toolbox.
|
||||||
await this._inspector.destroy();
|
this._inspector.destroy();
|
||||||
|
|
||||||
this._inspector = null;
|
this._inspector = null;
|
||||||
this._highlighter = null;
|
this._highlighter = null;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче