diff options
Diffstat (limited to 'chrome/renderer/extensions/renderer_extension_bindings.cc')
-rw-r--r-- | chrome/renderer/extensions/renderer_extension_bindings.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/renderer/extensions/renderer_extension_bindings.cc b/chrome/renderer/extensions/renderer_extension_bindings.cc index 374e673..de958d1 100644 --- a/chrome/renderer/extensions/renderer_extension_bindings.cc +++ b/chrome/renderer/extensions/renderer_extension_bindings.cc @@ -77,12 +77,15 @@ class ExtensionImpl : public ExtensionBase { if (!renderview) return v8::Undefined(); - if (args.Length() >= 2 && args[0]->IsString() && args[1]->IsString()) { - std::string id = *v8::String::Utf8Value(args[0]->ToString()); - std::string channel_name = *v8::String::Utf8Value(args[1]->ToString()); + if (args.Length() >= 3 && args[0]->IsString() && args[1]->IsString() && + args[2]->IsString()) { + std::string source_id = *v8::String::Utf8Value(args[0]->ToString()); + std::string target_id = *v8::String::Utf8Value(args[1]->ToString()); + std::string channel_name = *v8::String::Utf8Value(args[2]->ToString()); int port_id = -1; renderview->Send(new ViewHostMsg_OpenChannelToExtension( - renderview->routing_id(), id, channel_name, &port_id)); + renderview->routing_id(), source_id, target_id, + channel_name, &port_id)); return v8::Integer::New(port_id); } return v8::Undefined(); |