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

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: Remove reliance on space->Contains check, which is only valid for V8-allocated memory. Go to unsign… 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
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/code-stubs.h » ('j') | src/ic.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
danno 2013/06/25 18:40:35 V8 style nit: then/else blocks wrapped in {}
Sigurður Ásgeirsson 2013/06/27 13:06:40 Done.
+ native_context_ = Snapshot::NewContextFromSnapshot();
+ else
+ native_context_ = Handle<Context>();
+
if (!native_context().is_null()) {
AddToWeakNativeContextList(*native_context());
isolate->set_context(*native_context());
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/code-stubs.h » ('j') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698