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..646cb45b759a9ede4222ee9767ee6a1e1d895616 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); |
} |
} |
} |
@@ -79,7 +79,8 @@ WebInspector.ActionDelegate = function() |
WebInspector.ActionDelegate.prototype = { |
/** |
* @param {!WebInspector.Context} context |
- * @return {boolean} |
+ * @return {boolean} True if handled. Note that lazily loaded modules won't be able to consume |
+ * platform events from their actions. |
*/ |
handleAction: function(context) {} |
} |