| Index: extensions/renderer/runtime_custom_bindings.cc
|
| diff --git a/extensions/renderer/runtime_custom_bindings.cc b/extensions/renderer/runtime_custom_bindings.cc
|
| index 483f08b7796d2f2c2f80634cf70a6d3ce9b1f680..29ae4f3443ccf815206f001c7aced5d5e3458eda 100644
|
| --- a/extensions/renderer/runtime_custom_bindings.cc
|
| +++ b/extensions/renderer/runtime_custom_bindings.cc
|
| @@ -69,7 +69,7 @@ void RuntimeCustomBindings::OpenChannelToExtension(
|
| info.source_url = context()->GetURL();
|
| std::string channel_name = *v8::String::Utf8Value(args[1]);
|
| bool include_tls_channel_id =
|
| - args.Length() > 2 ? args[2]->BooleanValue() : false;
|
| + args.Length() > 2 ? args[2].As<v8::Boolean>()->Value() : false;
|
| int port_id = -1;
|
| renderframe->Send(new ExtensionHostMsg_OpenChannelToExtension(
|
| renderframe->GetRoutingID(), info, channel_name, include_tls_channel_id,
|
| @@ -126,7 +126,7 @@ void RuntimeCustomBindings::GetExtensionViews(
|
|
|
| // |browser_window_id| == extension_misc::kUnknownWindowId means getting
|
| // all views for the current extension.
|
| - int browser_window_id = args[0]->Int32Value();
|
| + int browser_window_id = args[0].As<v8::Int32>()->Value();
|
|
|
| std::string view_type_string = *v8::String::Utf8Value(args[1]);
|
| StringToUpperASCII(&view_type_string);
|
| @@ -165,7 +165,10 @@ void RuntimeCustomBindings::GetExtensionViews(
|
| if (!context.IsEmpty()) {
|
| v8::Local<v8::Value> window = context->Global();
|
| DCHECK(!window.IsEmpty());
|
| - v8_views->Set(v8::Integer::New(args.GetIsolate(), v8_index++), window);
|
| + auto maybe = v8_views->Set(
|
| + context, v8::Integer::New(args.GetIsolate(), v8_index++), window);
|
| + if (maybe.IsNothing() || !maybe.FromJust())
|
| + return;
|
| }
|
| }
|
|
|
|
|