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

Unified Diff: src/bootstrapper.cc

Issue 2616673003: [promises] Move various promise reject functions to TF (Closed)
Patch Set: fix build 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') | 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 e8f8846a6a11b2646f8c042e3d8aed2e27229f8d..4547289db17f58b0d8c140e697304e58d9d40383 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1899,6 +1899,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);
@@ -1914,14 +1917,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);
@@ -1981,7 +1976,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698