Chromium Code Reviews| Index: src/bootstrapper.cc |
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
| index 143c00154c63b56304706f0c0515b93106b614d4..b5ce98b53294c9ed859ff5bb56568c736c2f6219 100644 |
| --- a/src/bootstrapper.cc |
| +++ b/src/bootstrapper.cc |
| @@ -3597,6 +3597,34 @@ bool Genesis::InstallNatives(GlobalContextType context_type) { |
| *isolate()->builtins()->JSBuiltinsConstructStub()); |
| InstallWithIntrinsicDefaultProto(isolate(), function, |
| Context::PROMISE_FUNCTION_INDEX); |
| + |
| + { |
| + Handle<Code> code = handle( |
| + isolate()->builtins()->builtin(Builtins::kPromiseResolveClosure), |
| + isolate()); |
| + Handle<SharedFunctionInfo> info = |
| + isolate()->factory()->NewSharedFunctionInfo(factory()->empty_string(), |
| + code, false); |
| + info->set_internal_formal_parameter_count(1); |
| + info->set_length(1); |
| + native_context()->set_promise_resolve_shared_fun(*info); |
| + |
| + code = handle( |
| + isolate()->builtins()->builtin(Builtins::kPromiseRejectClosure), |
| + isolate()); |
| + info = isolate()->factory()->NewSharedFunctionInfo( |
| + factory()->empty_string(), code, false); |
| + info->set_internal_formal_parameter_count(2); |
| + info->set_length(1); |
| + native_context()->set_promise_reject_shared_fun(*info); |
| + } |
| + |
| + Handle<JSFunction> create_resolving_functions = SimpleCreateFunction( |
| + isolate(), |
| + factory()->InternalizeUtf8String("create_resolving_functions"), |
|
Benedikt Meurer
2016/11/09 05:14:30
Nit: this guy doesn't need a name IMHO.
gsathya
2016/11/09 15:57:44
Done.
|
| + Builtins::kCreateResolvingFunctions, 2, false); |
| + native_context()->set_create_resolving_functions( |
| + *create_resolving_functions); |
| } |
| InstallBuiltinFunctionIds(); |