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

Unified Diff: src/bootstrapper.cc

Issue 2572623002: PromiseHandle port to TF (Closed)
Patch Set: Address comments Created 4 years 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 c47854cf1b1bfc184fa1e43c8589cc924b0a7ccb..324b0dac813586a3bd07da2c5562a540937bb898 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1915,6 +1915,27 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Context::PROMISE_RESOLVE_INDEX);
}
+ { // Internal: PromiseHandle
+ Handle<JSFunction> function = SimpleCreateFunction(
+ isolate, factory->empty_string(), Builtins::kPromiseHandle, 3, true);
+ InstallWithIntrinsicDefaultProto(isolate, function,
+ Context::PROMISE_HANDLE_INDEX);
+ // Set up catch prediction
+ Handle<Code> promise_handle = isolate->builtins()->PromiseHandle();
+ promise_handle->set_is_promise_rejection(true);
+ }
+
+ { // Internal: PromiseHandleReject
+ Handle<JSFunction> function =
+ SimpleCreateFunction(isolate, factory->empty_string(),
+ Builtins::kPromiseHandleReject, 3, false);
+ InstallWithIntrinsicDefaultProto(isolate, function,
+ Context::PROMISE_HANDLE_REJECT_INDEX);
+ // Set up catch prediction
+ Handle<Code> promise_handle = isolate->builtins()->PromiseHandleReject();
+ promise_handle->set_is_exception_caught(true);
+ }
+
{
Handle<Code> code =
handle(isolate->builtins()->builtin(Builtins::kPromiseResolveClosure),
« 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