зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
174bb83d75
Коммит
bf1e1965c3
|
@ -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() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче