Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 07431d83b10dcb4f1f6fbbffad62b25876db7c2a..7deb623d370867d6730fc82e521cb109cb8f40e8 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4920,7 +4920,9 @@ MaybeObject* Heap::AllocateGlobalContext(JSFunction* function, |
Context* context = reinterpret_cast<Context*>(result); |
context->set_map_no_write_barrier(global_context_map()); |
context->set_closure(function); |
+ context->set_previous(function->context()); |
context->set_extension(scope_info); |
+ context->set_global_object(function->context()->global_object()); |
ASSERT(context->IsGlobalContext()); |
ASSERT(result->IsContext()); |
return context; |