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

Unified Diff: src/bootstrapper.cc

Issue 2567333002: [promises] port NewPromiseCapability to TF (Closed)
Patch Set: Make gcmole happy Created 3 years, 12 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/ast/ast-types.cc ('k') | 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 d02e55f350f528743b9f8974f92198965ec696be..8ecaec1c3084d56869695c4ae1ab98128c311e01 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1843,6 +1843,24 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
to_primitive->shared()->set_length(1);
}
+ {
+ Handle<Code> code = isolate->builtins()->PromiseGetCapabilitiesExecutor();
+ Handle<SharedFunctionInfo> info =
+ factory->NewSharedFunctionInfo(factory->empty_string(), code, true);
+ info->SetConstructStub(*isolate->builtins()->JSBuiltinsConstructStub());
+ info->set_instance_class_name(isolate->heap()->Object_string());
+ info->set_internal_formal_parameter_count(2);
+ info->set_length(2);
+ native_context()->set_promise_get_capabilities_executor_shared_fun(*info);
+
+ // %new_promise_capability(C, debugEvent)
+ Handle<JSFunction> new_promise_capability =
+ SimpleCreateFunction(isolate, factory->empty_string(),
+ Builtins::kNewPromiseCapability, 2, false);
+ InstallWithIntrinsicDefaultProto(isolate, new_promise_capability,
+ Context::NEW_PROMISE_CAPABILITY_INDEX);
+ }
+
{ // -- P r o m i s e
// Set catch prediction
Handle<Code> promise_code = isolate->builtins()->PromiseConstructor();
@@ -1972,12 +1990,6 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
info->set_length(1);
native_context()->set_promise_reject_shared_fun(*info);
}
-
- Handle<JSFunction> create_resolving_functions =
- SimpleCreateFunction(isolate, factory->empty_string(),
- Builtins::kCreateResolvingFunctions, 2, false);
- native_context()->set_create_resolving_functions(
- *create_resolving_functions);
}
{ // -- R e g E x p
« no previous file with comments | « src/ast/ast-types.cc ('k') | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698