From bf1e1965c395f3dbe6aa5bbadc4832e7aea62af9 Mon Sep 17 00:00:00 2001 From: Nicolas Chevobbe Date: Fri, 30 Apr 2021 05:04:29 +0000 Subject: [PATCH] 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 --- devtools/client/inspector/inspector.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/devtools/client/inspector/inspector.js b/devtools/client/inspector/inspector.js index 49ba0fa56425..af25c958cb3a 100644 --- a/devtools/client/inspector/inspector.js +++ b/devtools/client/inspector/inspector.js @@ -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() {