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

Unified Diff: src/bootstrapper.cc

Issue 1097893002: Serializer: assert that we deserialize only one native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | no next file » | no next file with comments »
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
index 2246f6e1a797741fcc40f43d2ff0ee2e993aa1dd..2e46530d95f8010215e15bc7a6a63daf29624591 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -895,6 +895,8 @@ void Genesis::HookUpGlobalObject(Handle<GlobalObject> global_object,
// Replace outdated global objects in deserialized contexts.
for (int i = 0; i < outdated_contexts->length(); ++i) {
Context* context = Context::cast(outdated_contexts->get(i));
+ // Assert that there is only one native context.
+ DCHECK(!context->IsNativeContext() || context == *native_context());
DCHECK_EQ(context->global_object(), *global_object_from_snapshot);
context->set_global_object(*global_object);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698