| 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());
|
|
|