Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 125a31be06f94b802e9f61a465335ee641b8c189..c7126d742c4628b45ab064e3cbb3756c7ca87120 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -347,12 +347,14 @@ StartupData V8::CreateSnapshotDataBlob(const char* custom_source) { |
base::ElapsedTimer timer; |
timer.Start(); |
Isolate::Scope isolate_scope(isolate); |
+ internal_isolate->set_creating_default_snapshot(true); |
internal_isolate->Init(NULL); |
Persistent<Context> context; |
i::Snapshot::Metadata metadata; |
{ |
HandleScope handle_scope(isolate); |
Handle<Context> new_context = Context::New(isolate); |
+ internal_isolate->set_creating_default_snapshot(false); |
context.Reset(isolate, new_context); |
if (custom_source != NULL) { |
metadata.set_embeds_script(true); |