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

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

Issue 2314903004: [promises] Move PromiseResolveThenableJob to c++ (Closed)
Patch Set: cast to jsobject Created 4 years, 3 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-debug.cc ('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 1bc6fcdaf97d55a21ad1495c99cb3ce5492c15e3..e8b9d45dd09874e9c94d0112d2cc01d0f54411c1 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -555,6 +555,23 @@ RUNTIME_FUNCTION(Runtime_GetAndResetRuntimeCallStats) {
}
}
+RUNTIME_FUNCTION(Runtime_EnqueuePromiseResolveThenableJob) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 7);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, resolution, 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, then, 2);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, resolve, 3);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, reject, 4);
+ CONVERT_ARG_HANDLE_CHECKED(Object, before_debug_event, 5);
+ CONVERT_ARG_HANDLE_CHECKED(Object, after_debug_event, 6);
+ Handle<PromiseContainer> container = isolate->factory()->NewPromiseContainer(
+ promise, resolution, then, resolve, reject, before_debug_event,
+ after_debug_event);
+ isolate->EnqueueMicrotask(container);
+ return isolate->heap()->undefined_value();
+}
+
RUNTIME_FUNCTION(Runtime_EnqueueMicrotask) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
« src/objects-debug.cc ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698