Chromium Code Reviews| Index: src/runtime/runtime-internal.cc |
| diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
| index db2aa01ea8db022d2c35bc7259783dc78d08eec2..2d56e38a4da26d5facba74a27e542a0a4efbaffe 100644 |
| --- a/src/runtime/runtime-internal.cc |
| +++ b/src/runtime/runtime-internal.cc |
| @@ -555,6 +555,20 @@ RUNTIME_FUNCTION(Runtime_GetAndResetRuntimeCallStats) { |
| } |
| } |
| +RUNTIME_FUNCTION(Runtime_EnqueuePromiseResolveThenableJob) { |
| + HandleScope scope(isolate); |
| + DCHECK(args.length() == 5); |
| + CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
| + CONVERT_ARG_HANDLE_CHECKED(JSObject, resolution, 1); |
|
adamk
2016/09/06 21:04:57
The struct says these are just Objects; which is i
gsathya
2016/09/07 04:45:30
Updated the struct to be more specific.
|
| + CONVERT_ARG_HANDLE_CHECKED(JSFunction, then, 2); |
| + CONVERT_ARG_HANDLE_CHECKED(JSFunction, resolve, 3); |
| + CONVERT_ARG_HANDLE_CHECKED(JSFunction, reject, 4); |
| + Handle<PromiseContainer> container = isolate->factory()->NewPromiseContainer( |
| + promise, resolution, then, resolve, reject); |
| + isolate->EnqueueMicrotask(container); |
| + return isolate->heap()->undefined_value(); |
| +} |
| + |
| RUNTIME_FUNCTION(Runtime_EnqueueMicrotask) { |
| HandleScope scope(isolate); |
| DCHECK(args.length() == 1); |