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

Unified Diff: src/heap.cc

Issue 7275022: Explicitly pass the closure when allocating a catch or with context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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/heap.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
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 607eda7ebdd0218ca0df2ff021fcf794997a3f3a..6bb0206cf08e6fec55814ffae559bfa3c4884a22 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3939,7 +3939,8 @@ MaybeObject* Heap::AllocateFunctionContext(int length, JSFunction* function) {
}
-MaybeObject* Heap::AllocateCatchContext(Context* previous,
+MaybeObject* Heap::AllocateCatchContext(JSFunction* function,
+ Context* previous,
String* name,
Object* thrown_object) {
STATIC_ASSERT(Context::MIN_CONTEXT_SLOTS == Context::THROWN_OBJECT_INDEX);
@@ -3950,7 +3951,7 @@ MaybeObject* Heap::AllocateCatchContext(Context* previous,
}
Context* context = reinterpret_cast<Context*>(result);
context->set_map(catch_context_map());
- context->set_closure(previous->closure());
+ context->set_closure(function);
context->set_previous(previous);
context->set_extension(name);
context->set_global(previous->global());
@@ -3959,7 +3960,8 @@ MaybeObject* Heap::AllocateCatchContext(Context* previous,
}
-MaybeObject* Heap::AllocateWithContext(Context* previous,
+MaybeObject* Heap::AllocateWithContext(JSFunction* function,
+ Context* previous,
JSObject* extension) {
Object* result;
{ MaybeObject* maybe_result = AllocateFixedArray(Context::MIN_CONTEXT_SLOTS);
@@ -3967,7 +3969,7 @@ MaybeObject* Heap::AllocateWithContext(Context* previous,
}
Context* context = reinterpret_cast<Context*>(result);
context->set_map(with_context_map());
- context->set_closure(previous->closure());
+ context->set_closure(function);
context->set_previous(previous);
context->set_extension(extension);
context->set_global(previous->global());
« no previous file with comments | « src/heap.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698