Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index e2b68aa48482ff118f9d9c12ca38de81f049c5bb..72cd23abe731a58a243ad577cd593dfd367de606 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -503,5 +503,19 @@ RUNTIME_FUNCTION(Runtime_GetAndResetRuntimeCallStats) { |
return *result; |
} |
+RUNTIME_FUNCTION(Runtime_EnqueueMicrotask) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, microtask, 0); |
+ isolate->EnqueueMicrotask(microtask); |
+ return isolate->heap()->undefined_value(); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_RunMicrotasks) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 0); |
+ isolate->RunMicrotasks(); |
+ return isolate->heap()->undefined_value(); |
+} |
} // namespace internal |
} // namespace v8 |