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

Unified Diff: src/heap.cc

Issue 10872084: Allocate block-scoped global bindings to global context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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/compiler.cc ('k') | src/isolate.h » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/compiler.cc ('k') | src/isolate.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698