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

Unified Diff: src/bootstrapper.cc

Issue 2626793003: [promises] Remove unneeded PromiseCreate function from promise.js (Closed)
Patch Set: Created 3 years, 11 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/api.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
« no previous file with comments | « src/api.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698