зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1569676 - Make accessibility panel's destroy synchronous. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D39708 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
88686d7850
Коммит
0284ed4bdb
|
@ -274,16 +274,11 @@ AccessibilityPanel.prototype = {
|
|||
return this._toolbox.target;
|
||||
},
|
||||
|
||||
async destroy() {
|
||||
if (this._destroying) {
|
||||
await this._destroying;
|
||||
destroy() {
|
||||
if (this._destroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
let resolver;
|
||||
this._destroying = new Promise(resolve => {
|
||||
resolver = resolve;
|
||||
});
|
||||
this._destroyed = true;
|
||||
|
||||
this.target.off("navigate", this.onTabNavigated);
|
||||
this._toolbox.off("select", this.onPanelVisibilityChange);
|
||||
|
@ -316,8 +311,6 @@ AccessibilityPanel.prototype = {
|
|||
this.panelWin.gTelemetry = null;
|
||||
|
||||
this.emit("destroyed");
|
||||
|
||||
resolver();
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче