Chromium Code Reviews

Unified Diff: src/d8.cc

Issue 2609833003: Add support for idle tasks to the default platform (Closed)
Patch Set: updates Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « include/libplatform/libplatform.h ('k') | src/libplatform/default-platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 9c5dd0cd73ec7be83eecb9cf5242ead0845da11b..ca28c17f93cda74dfba4be532961ea9084ae7149 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -27,6 +27,7 @@
#include "src/base/debug/stack_trace.h"
#include "src/base/logging.h"
#include "src/base/platform/platform.h"
+#include "src/base/platform/time.h"
#include "src/base/sys-info.h"
#include "src/basic-block-profiler.h"
#include "src/interpreter/interpreter.h"
@@ -2595,6 +2596,8 @@ void Shell::CollectGarbage(Isolate* isolate) {
void Shell::EmptyMessageQueues(Isolate* isolate) {
if (!i::FLAG_verify_predictable) {
while (v8::platform::PumpMessageLoop(g_platform, isolate)) continue;
+ v8::platform::RunIdleTasks(g_platform, isolate,
+ 50.0 / base::Time::kMillisecondsPerSecond);
}
}
« no previous file with comments | « include/libplatform/libplatform.h ('k') | src/libplatform/default-platform.h » ('j') | no next file with comments »

Powered by Google App Engine