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

Unified Diff: src/bootstrapper.cc

Issue 2616673003: [promises] Move various promise reject functions to TF (Closed)
Patch Set: more fixes 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 | « no previous file | src/builtins/builtins.h » ('j') | src/builtins/builtins-promise.cc » ('J')
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 87a6ba519233bd1c08089f55e0fb4bb0061daba7..9d2953eed67e549f51005ce24857a350256c8a05 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1891,6 +1891,9 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
SimpleInstallFunction(promise_fun, "resolve", Builtins::kPromiseResolve, 1,
true, DONT_ENUM);
+ SimpleInstallFunction(promise_fun, "reject", Builtins::kPromiseReject, 1,
+ true, DONT_ENUM);
+
Handle<Map> prototype_map(prototype->map());
Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate);
@@ -1906,14 +1909,6 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
isolate, function, Context::PROMISE_INTERNAL_CONSTRUCTOR_INDEX);
}
- { // Internal: PromiseCreateAndSet
- Handle<JSFunction> function =
- SimpleCreateFunction(isolate, factory->empty_string(),
- Builtins::kPromiseCreateAndSet, 2, false);
- InstallWithIntrinsicDefaultProto(isolate, function,
- Context::PROMISE_CREATE_AND_SET_INDEX);
- }
-
{ // Internal: IsPromise
Handle<JSFunction> function = SimpleCreateFunction(
isolate, factory->empty_string(), Builtins::kIsPromise, 1, false);
@@ -1973,7 +1968,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
isolate);
info =
factory->NewSharedFunctionInfo(factory->empty_string(), code, false);
- info->set_internal_formal_parameter_count(2);
+ info->set_internal_formal_parameter_count(1);
info->set_length(1);
native_context()->set_promise_reject_shared_fun(*info);
}
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | src/builtins/builtins-promise.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698