Index: extensions/renderer/api_binding.cc |
diff --git a/extensions/renderer/api_binding.cc b/extensions/renderer/api_binding.cc |
index 218565b17821ff57a41e2f1f326a45db8787312b..e10886f4f7107bdd87793c472ac2656ba03143a4 100644 |
--- a/extensions/renderer/api_binding.cc |
+++ b/extensions/renderer/api_binding.cc |
@@ -210,9 +210,10 @@ void APIBinding::HandleCall(const std::string& name, |
v8::TryCatch try_catch(isolate); |
APIBindingHooks::RequestResult hooks_result = |
APIBindingHooks::RequestResult::NOT_HANDLED; |
+ v8::Local<v8::Value> return_value; |
hooks_result = binding_hooks_->HandleRequest(api_name_, name, context, |
signature, &argument_list, |
- *type_refs_); |
+ *type_refs_, &return_value); |
switch (hooks_result) { |
case APIBindingHooks::RequestResult::INVALID_INVOCATION: |
@@ -224,6 +225,8 @@ void APIBinding::HandleCall(const std::string& name, |
try_catch.ReThrow(); |
return; |
case APIBindingHooks::RequestResult::HANDLED: |
+ if (!return_value.IsEmpty()) |
jbroman
2017/01/02 20:05:46
Do we expect this to ever be IsEmpty is a case tha
Devlin
2017/01/04 18:38:07
In the case of a native (c++) handler hook without
|
+ arguments->Return(return_value); |
return; // Our work here is done. |
case APIBindingHooks::RequestResult::NOT_HANDLED: |
break; // Handle in the default manner. |