Index: samples/lineprocessor.cc |
diff --git a/samples/lineprocessor.cc b/samples/lineprocessor.cc |
index f259ea4e9436bd59c027be37de060eae547d7708..7e820b377f47cf662ef422d31fa085b7dfd27e61 100644 |
--- a/samples/lineprocessor.cc |
+++ b/samples/lineprocessor.cc |
@@ -133,7 +133,9 @@ void DispatchDebugMessages() { |
int RunMain(int argc, char* argv[]) { |
v8::V8::SetFlagsFromCommandLine(&argc, argv, true); |
- v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
+ v8::Isolate* isolate = v8::Isolate::New(); |
+ v8::Isolate::Scope isolate_scope(isolate); |
+ v8::Locker locker(isolate); |
v8::HandleScope handle_scope(isolate); |
v8::Handle<v8::String> script_source; |
@@ -212,8 +214,6 @@ int RunMain(int argc, char* argv[]) { |
debug_message_context.Reset(isolate, context); |
- v8::Locker locker(isolate); |
- |
if (support_callback) { |
v8::Debug::SetDebugMessageDispatchHandler(DispatchDebugMessages, true); |
} |