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

Unified Diff: src/api.cc

Issue 1811263002: [serializer] tweak startup serializer for warming up. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 9 months 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
« no previous file with comments | « no previous file | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698