Chromium Code Reviews| Index: src/factory.cc |
| diff --git a/src/factory.cc b/src/factory.cc |
| index 564f821c42875dd1e14e68d0344678b1fe9f8dc0..6ed090e265397a062395f1cc35bcc73557f6e913 100644 |
| --- a/src/factory.cc |
| +++ b/src/factory.cc |
| @@ -962,6 +962,21 @@ Handle<Context> Factory::NewBlockContext(Handle<JSFunction> function, |
| return context; |
| } |
| +Handle<Context> Factory::NewPromiseResolvingFunctionContext( |
| + Handle<JSFunction> function, Handle<Cell> already_visited, |
| + Handle<JSObject> promise, Handle<Object> debug_event) { |
| + Handle<FixedArray> array = NewFixedArray(Context::MIN_CONTEXT_SLOTS + 3); |
| + array->set_map_no_write_barrier(*function_context_map()); |
| + Handle<Context> context = Handle<Context>::cast(array); |
| + context->set_closure(*function); |
| + context->set_previous(function->context()); |
| + context->set_extension(*the_hole_value()); |
| + context->set_native_context(function->native_context()); |
| + context->set(4, *already_visited); |
| + context->set(5, *promise); |
| + context->set(6, *debug_event); |
|
adamk
2016/11/08 18:09:55
Looks like if you let the caller do the setting, y
gsathya
2016/11/08 20:03:19
NewDebugEvaluateContext and NewCatchContext have a
|
| + return context; |
| +} |
| Handle<Struct> Factory::NewStruct(InstanceType type) { |
| CALL_HEAP_FUNCTION( |