Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1959)

Unified Diff: Source/devtools/front_end/ui/ActionRegistry.js

Issue 655273002: DevTools: zoom is broken in hosted mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ui/ActionRegistry.js
diff --git a/Source/devtools/front_end/ui/ActionRegistry.js b/Source/devtools/front_end/ui/ActionRegistry.js
index 31d6149b3582ccff413d5ee211b75b2f0a652c95..c6ee91d074bc86714b0dee79a2ddbd5fc0f8f1a5 100644
--- a/Source/devtools/front_end/ui/ActionRegistry.js
+++ b/Source/devtools/front_end/ui/ActionRegistry.js
@@ -50,21 +50,21 @@ WebInspector.ActionRegistry.prototype = {
/**
* @param {string} actionId
- * @return {boolean}
+ * @return {!Promise.<boolean>}
*/
execute: function(actionId)
{
var extension = this._actionsById.get(actionId);
console.assert(extension, "No action found for actionId '" + actionId + "'");
- extension.instancePromise().then(handleAction).done();
- return !!extension;
+ return extension.instancePromise().then(handleAction);
/**
* @param {!Object} actionDelegate
+ * @return {boolean}
*/
function handleAction(actionDelegate)
{
- /** @type {!WebInspector.ActionDelegate} */(actionDelegate).handleAction(WebInspector.context);
+ return /** @type {!WebInspector.ActionDelegate} */(actionDelegate).handleAction(WebInspector.context);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698