Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 98fe997d7275bef4f635376b11e48a998d111c0c..7fd09220437f63e4776d716e076a5fc645742d28 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -14878,31 +14878,23 @@ RUNTIME_FUNCTION(Runtime_SetIsObserved) { |
} |
-RUNTIME_FUNCTION(Runtime_SetMicrotaskPending) { |
- SealHandleScope shs(isolate); |
+RUNTIME_FUNCTION(Runtime_EnqueueMicrotask) { |
+ HandleScope scope(isolate); |
ASSERT(args.length() == 1); |
- CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); |
- bool old_state = isolate->microtask_pending(); |
- isolate->set_microtask_pending(new_state); |
- return isolate->heap()->ToBoolean(old_state); |
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, microtask, 0); |
+ isolate->EnqueueMicrotask(microtask); |
+ return isolate->heap()->undefined_value(); |
} |
RUNTIME_FUNCTION(Runtime_RunMicrotasks) { |
HandleScope scope(isolate); |
ASSERT(args.length() == 0); |
- if (isolate->microtask_pending()) Execution::RunMicrotasks(isolate); |
+ isolate->RunMicrotasks(); |
return isolate->heap()->undefined_value(); |
} |
-RUNTIME_FUNCTION(Runtime_GetMicrotaskState) { |
- SealHandleScope shs(isolate); |
- ASSERT(args.length() == 0); |
- return isolate->heap()->microtask_state(); |
-} |
- |
- |
RUNTIME_FUNCTION(Runtime_GetObservationState) { |
SealHandleScope shs(isolate); |
ASSERT(args.length() == 0); |