Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: net/proxy/proxy_resolver_v8.cc

Issue 23861002: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/v8_value_converter_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
}
« no previous file with comments | « content/renderer/v8_value_converter_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698