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

Unified Diff: src/runtime.cc

Issue 290633010: Move microtask queueing logic from JavaScript to C++ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Handle comments Created 6 years, 7 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
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698