diff options
-rw-r--r-- | content/public/test/render_view_test.cc | 4 | ||||
-rw-r--r-- | content/renderer/browser_plugin/browser_plugin.cc | 2 | ||||
-rw-r--r-- | content/renderer/pepper/message_channel.cc | 2 | ||||
-rw-r--r-- | content/renderer/pepper/v8_var_converter.cc | 4 | ||||
-rw-r--r-- | content/renderer/render_view_impl.cc | 4 | ||||
-rw-r--r-- | content/renderer/v8_value_converter_impl.cc | 4 | ||||
-rw-r--r-- | net/proxy/proxy_resolver_v8.cc | 9 |
7 files changed, 15 insertions, 14 deletions
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc index 4136fe0..ac8c37a 100644 --- a/content/public/test/render_view_test.cc +++ b/content/public/test/render_view_test.cc @@ -93,7 +93,7 @@ void RenderViewTest::ExecuteJavaScript(const char* js) { bool RenderViewTest::ExecuteJavaScriptAndReturnIntValue( const string16& script, int* int_result) { - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Handle<v8::Value> result = GetMainFrame()->executeScriptAndReturnValue(WebScriptSource(script)); if (result.IsEmpty() || !result->IsInt32()) @@ -255,7 +255,7 @@ gfx::Rect RenderViewTest::GetElementBounds(const std::string& element_id) { std::string script = ReplaceStringPlaceholders(kGetCoordinatesScript, params, NULL); - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue( WebScriptSource(WebString::fromUTF8(script))); if (value.IsEmpty() || !value->IsArray()) diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc index 23537a5..0a14a4e 100644 --- a/content/renderer/browser_plugin/browser_plugin.cc +++ b/content/renderer/browser_plugin/browser_plugin.cc @@ -767,7 +767,7 @@ void BrowserPlugin::TriggerEvent(const std::string& event_name, if (!frame) return; - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Local<v8::Context> context = frame->mainWorldScriptContext(); v8::Context::Scope context_scope(context); diff --git a/content/renderer/pepper/message_channel.cc b/content/renderer/pepper/message_channel.cc index efcdfb3..14cb973 100644 --- a/content/renderer/pepper/message_channel.cc +++ b/content/renderer/pepper/message_channel.cc @@ -366,7 +366,7 @@ void MessageChannel::NPVariantToPPVar(const NPVariant* variant) { } void MessageChannel::PostMessageToJavaScript(PP_Var message_data) { - v8::HandleScope scope; + v8::HandleScope scope(v8::Isolate::GetCurrent()); // Because V8 is probably not on the stack for Native->JS calls, we need to // enter the appropriate context for the plugin. diff --git a/content/renderer/pepper/v8_var_converter.cc b/content/renderer/pepper/v8_var_converter.cc index 38447a8..61bb961 100644 --- a/content/renderer/pepper/v8_var_converter.cc +++ b/content/renderer/pepper/v8_var_converter.cc @@ -266,7 +266,7 @@ bool V8VarConverter::ToV8Value(const PP_Var& var, v8::Handle<v8::Context> context, v8::Handle<v8::Value>* result) { v8::Context::Scope context_scope(context); - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(context->GetIsolate()); VarHandleMap visited_ids; ParentVarSet parent_ids; @@ -370,7 +370,7 @@ void V8VarConverter::FromV8Value( v8::Handle<v8::Context> context, const base::Callback<void(const ScopedPPVar&, bool)>& callback) { v8::Context::Scope context_scope(context); - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(context->GetIsolate()); HandleVarMap visited_handles; ParentHandleSet parent_handles; diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 59b9dcc..abfa452 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -539,7 +539,7 @@ static bool IsNonLocalTopLevelNavigation(const GURL& url, } static void NotifyTimezoneChange(WebKit::WebFrame* frame) { - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Context::Scope context_scope(frame->mainWorldScriptContext()); v8::Date::DateTimeConfigurationChangeNotification(); WebKit::WebFrame* child = frame->firstChild(); @@ -4384,7 +4384,7 @@ void RenderViewImpl::EvaluateScript(const string16& frame_xpath, const string16& jscript, int id, bool notify_result) { - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Handle<v8::Value> result; WebFrame* web_frame = GetChildFrame(frame_xpath); if (web_frame) diff --git a/content/renderer/v8_value_converter_impl.cc b/content/renderer/v8_value_converter_impl.cc index cacd9de..f21e5db 100644 --- a/content/renderer/v8_value_converter_impl.cc +++ b/content/renderer/v8_value_converter_impl.cc @@ -112,7 +112,7 @@ void V8ValueConverterImpl::SetStrategy(Strategy* strategy) { v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Value( const base::Value* value, v8::Handle<v8::Context> context) const { v8::Context::Scope context_scope(context); - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(context->GetIsolate()); return handle_scope.Close(ToV8ValueImpl(value)); } @@ -120,7 +120,7 @@ Value* V8ValueConverterImpl::FromV8Value( v8::Handle<v8::Value> val, v8::Handle<v8::Context> context) const { v8::Context::Scope context_scope(context); - v8::HandleScope handle_scope; + v8::HandleScope handle_scope(context->GetIsolate()); FromV8ValueState state(avoid_identity_hash_for_testing_); return FromV8ValueImpl(val, &state); } diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc index 0c51d5d..190a4c0 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. } |