Index: src/mksnapshot.cc |
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc |
index 7592a8953110683c83c8f7e8942a57cd32555df7..b3c6097c859249439185907a9357423f49596c05 100644 |
--- a/src/mksnapshot.cc |
+++ b/src/mksnapshot.cc |
@@ -328,18 +328,13 @@ int main(int argc, char** argv) { |
} |
#endif |
i::Serializer::Enable(); |
- Isolate* isolate = Isolate::GetCurrent(); |
- Persistent<Context> context; |
- { |
- HandleScope handle_scope(isolate); |
- context.Reset(isolate, Context::New(isolate)); |
- } |
- |
+ Persistent<Context> context = v8::Context::New(); |
if (context.IsEmpty()) { |
fprintf(stderr, |
"\nException thrown while compiling natives - see above.\n\n"); |
exit(1); |
} |
+ Isolate* isolate = context->GetIsolate(); |
if (i::FLAG_extra_code != NULL) { |
context->Enter(); |
// Capture 100 frames if anything happens. |