Index: net/proxy/proxy_resolver_v8.cc |
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc |
index 0c51d5da3adc00aa22c3bcdb67e3f0f107760a8f..190a4c0c54248806766389502c5e4c9752157fa4 100644 |
--- a/net/proxy/proxy_resolver_v8.cc |
+++ b/net/proxy/proxy_resolver_v8.cc |
@@ -184,11 +184,12 @@ v8::Local<v8::String> ASCIILiteralToV8String(const char* ascii) { |
// Stringizes a V8 object by calling its toString() method. Returns true |
// on success. This may fail if the toString() throws an exception. |
bool V8ObjectToUTF16String(v8::Handle<v8::Value> object, |
- base::string16* utf16_result) { |
+ base::string16* utf16_result, |
+ v8::Isolate* isolate) { |
if (object.IsEmpty()) |
return false; |
- v8::HandleScope scope; |
+ v8::HandleScope scope(isolate); |
v8::Local<v8::String> str_object = object->ToString(); |
if (str_object.IsEmpty()) |
return false; |
@@ -507,7 +508,7 @@ class ProxyResolverV8::Context { |
if (!message.IsEmpty()) { |
line_number = message->GetLineNumber(); |
- V8ObjectToUTF16String(message->Get(), &error_message); |
+ V8ObjectToUTF16String(message->Get(), &error_message, isolate_); |
} |
js_bindings()->OnError(line_number, error_message); |
@@ -547,7 +548,7 @@ class ProxyResolverV8::Context { |
if (args.Length() == 0) { |
message = ASCIIToUTF16("undefined"); |
} else { |
- if (!V8ObjectToUTF16String(args[0], &message)) |
+ if (!V8ObjectToUTF16String(args[0], &message, args.GetIsolate())) |
return; // toString() threw an exception. |
} |