Bug 1708457 - [devtools] Don't return a Promise in Inspector#_destroyMarkup. r=jdescottes.

MarkupView#destroy is synchronous, so there's no need for _destroyMarkup to return
a Promise.
The different callsites don't do anything with the returned value so there's nothing
more to cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D113803
This commit is contained in:
Nicolas Chevobbe 2021-04-30 05:04:29 +00:00
Родитель 174bb83d75
Коммит bf1e1965c3
1 изменённых файлов: 1 добавлений и 7 удалений

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

@ -1739,20 +1739,14 @@ Inspector.prototype = {
},
_destroyMarkup: function() {
let destroyPromise;
if (this.markup) {
destroyPromise = this.markup.destroy();
this.markup.destroy();
this.markup = null;
} else {
destroyPromise = promise.resolve();
}
if (this._markupBox) {
this._markupBox.style.visibility = "hidden";
}
return destroyPromise;
},
onEyeDropperButtonClicked: function() {