Commit cc9da821 authored by yangguo's avatar yangguo Committed by Commit bot

Serializer: assert that we deserialize only one native context.

R=mvstanton@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/1097893002

Cr-Commit-Position: refs/heads/master@{#27932}
parent e96d2553
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment