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

Unified Diff: src/runtime/runtime-internal.cc

Issue 2406343002: [promises] Move PromiseReactionJob to c++ (Closed)
Patch Set: remove ; Created 4 years, 2 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
« src/objects.h ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index b7974bcf0970f303fcf1ab230ce1dec45058199f..fcd567d3df4a68e3c59abb2c98a05b9517aee74a 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -571,6 +571,23 @@ RUNTIME_FUNCTION(Runtime_GetAndResetRuntimeCallStats) {
}
}
+RUNTIME_FUNCTION(Runtime_EnqueuePromiseReactionJob) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 6);
+ CONVERT_ARG_HANDLE_CHECKED(Object, value, 0);
+ CONVERT_ARG_HANDLE_CHECKED(Object, tasks, 1);
+ CONVERT_ARG_HANDLE_CHECKED(Object, deferreds, 2);
+ CONVERT_ARG_HANDLE_CHECKED(Object, before_debug_event, 3);
+ CONVERT_ARG_HANDLE_CHECKED(Object, after_debug_event, 4);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, reaction_context, 5);
+ Handle<PromiseHandleInfo> promise_handle_info =
+ isolate->factory()->NewPromiseHandleInfo(
+ value, tasks, deferreds, before_debug_event, after_debug_event,
+ reaction_context);
adamk 2016/10/11 17:56:41 Rather than creating a function, I think you shoul
+ isolate->EnqueueMicrotask(promise_handle_info);
+ return isolate->heap()->undefined_value();
+}
+
RUNTIME_FUNCTION(Runtime_EnqueuePromiseResolveThenableJob) {
HandleScope scope(isolate);
DCHECK(args.length() == 6);
« src/objects.h ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698