| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index c99cadc481d0718e3bda6ee5b55c836e68392063..3dfd4c459f03ae2bb850474695a8616b0fe198aa 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -1915,9 +1915,10 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| native_context()->set_promise_prototype_map(*prototype_map);
|
|
|
| { // Internal: PromiseInternalConstructor
|
| + // Also exposed as extrasUtils.createPromise.
|
| Handle<JSFunction> function =
|
| SimpleCreateFunction(isolate, factory->empty_string(),
|
| - Builtins::kPromiseInternalConstructor, 1, false);
|
| + Builtins::kPromiseInternalConstructor, 1, true);
|
| InstallWithIntrinsicDefaultProto(
|
| isolate, function, Context::PROMISE_INTERNAL_CONSTRUCTOR_INDEX);
|
| }
|
| @@ -1938,9 +1939,9 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| }
|
|
|
| { // Internal: ResolvePromise
|
| - Handle<JSFunction> function =
|
| - SimpleCreateFunction(isolate, factory->empty_string(),
|
| - Builtins::kResolvePromise, 2, false);
|
| + // Also exposed as extrasUtils.resolvePromise.
|
| + Handle<JSFunction> function = SimpleCreateFunction(
|
| + isolate, factory->empty_string(), Builtins::kResolvePromise, 2, true);
|
| InstallWithIntrinsicDefaultProto(isolate, function,
|
| Context::PROMISE_RESOLVE_INDEX);
|
| }
|
| @@ -3638,6 +3639,8 @@ bool Genesis::InstallNatives(GlobalContextType context_type) {
|
|
|
| InstallInternalArray(extras_utils, "InternalPackedArray", FAST_ELEMENTS);
|
|
|
| + InstallFunction(extras_utils, isolate()->promise_internal_constructor(),
|
| + factory()->NewStringFromAsciiChecked("createPromise"));
|
| InstallFunction(extras_utils, isolate()->promise_resolve(),
|
| factory()->NewStringFromAsciiChecked("resolvePromise"));
|
|
|
|
|