| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 325e2bb6d344c807c498bd891f69f55215427787..dd0e62e6086abbd98af1818028e5bc9c46629a77 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -501,13 +501,17 @@ StartupData V8::WarmUpSnapshotDataBlob(StartupData cold_snapshot_blob,
|
| Isolate::Scope isolate_scope(isolate);
|
| i::Snapshot::Initialize(internal_isolate);
|
| Persistent<Context> context;
|
| + bool success;
|
| {
|
| HandleScope handle_scope(isolate);
|
| - Local<Context> warmup_context = Context::New(isolate);
|
| - if (RunExtraCode(isolate, warmup_context, warmup_source, "<warm-up>")) {
|
| - Local<Context> fresh_context = Context::New(isolate);
|
| - context.Reset(isolate, fresh_context);
|
| - }
|
| + Local<Context> new_context = Context::New(isolate);
|
| + success = RunExtraCode(isolate, new_context, warmup_source, "<warm-up>");
|
| + }
|
| + if (success) {
|
| + HandleScope handle_scope(isolate);
|
| + isolate->ContextDisposedNotification(false);
|
| + Local<Context> new_context = Context::New(isolate);
|
| + context.Reset(isolate, new_context);
|
| }
|
|
|
| i::Snapshot::Metadata metadata;
|
|
|