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

Unified Diff: chrome/renderer/extensions/cast_streaming_native_handler.cc

Issue 107083006: More v8-API-related cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: chrome/renderer/extensions/cast_streaming_native_handler.cc
diff --git a/chrome/renderer/extensions/cast_streaming_native_handler.cc b/chrome/renderer/extensions/cast_streaming_native_handler.cc
index 884b2f396501dfad891dbe1aa51b1d09acaa6d60..a7532e87734851c7fb3e449e8aaedcb46dca647e 100644
--- a/chrome/renderer/extensions/cast_streaming_native_handler.cc
+++ b/chrome/renderer/extensions/cast_streaming_native_handler.cc
@@ -196,7 +196,8 @@ void CastStreamingNativeHandler::CallCreateCallback(
scoped_ptr<CastRtpStream> stream1,
scoped_ptr<CastRtpStream> stream2,
scoped_ptr<CastUdpTransport> udp_transport) {
- v8::HandleScope handle_scope(context()->isolate());
+ v8::Isolate* isolate = context()->isolate();
+ v8::HandleScope handle_scope(isolate);
v8::Context::Scope context_scope(context()->v8_context());
const int stream1_id = last_transport_id_++;
@@ -210,10 +211,10 @@ void CastStreamingNativeHandler::CallCreateCallback(
linked_ptr<CastUdpTransport>(udp_transport.release());
v8::Handle<v8::Value> callback_args[3];
- callback_args[0] = v8::Integer::New(stream1_id);
- callback_args[1] = v8::Integer::New(stream2_id);
- callback_args[2] = v8::Integer::New(udp_id);
- context()->CallFunction(create_callback_.NewHandle(context()->isolate()),
+ callback_args[0] = v8::Integer::New(isolate, stream1_id);
+ callback_args[1] = v8::Integer::New(isolate, stream2_id);
+ callback_args[2] = v8::Integer::New(isolate, udp_id);
+ context()->CallFunction(create_callback_.NewHandle(isolate),
3, callback_args);
create_callback_.reset();
}
« no previous file with comments | « chrome/renderer/extensions/app_window_custom_bindings.cc ('k') | chrome/renderer/extensions/chrome_v8_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698