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

Unified Diff: src/bootstrapper.cc

Issue 16578008: Improved function entry hook coverage (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@post_fix
Patch Set: WIP: Fix X64 implementation. Created 7 years, 6 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
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
old mode 100644
new mode 100755
index a51a9b117e7a1969acb146e047175eaf1ac4740e..f65e4662035684c84acab61691cec88ef4f543bd
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2574,7 +2574,13 @@ Genesis::Genesis(Isolate* isolate,
StackLimitCheck check(isolate);
if (check.HasOverflowed()) return;
- native_context_ = Snapshot::NewContextFromSnapshot();
+ // We can only de-serialize a context if the isolate was initialized from
+ // a snapshot. Otherwise we have to build the context from scratch.
+ if (isolate->initialized_from_snapshot())
+ native_context_ = Snapshot::NewContextFromSnapshot();
+ else
+ native_context_ = Handle<Context>();
+
if (!native_context().is_null()) {
AddToWeakNativeContextList(*native_context());
isolate->set_context(*native_context());

Powered by Google App Engine
This is Rietveld 408576698