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

Unified Diff: test/cctest/cctest.h

Issue 1209403005: Let the second pass phantom callbacks run in a separate task on the foreground thread. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Run second pass callbacks synchronously when GC is forced. Created 5 years, 5 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/list-inl.h ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index cc9edc801f5e268b17476178cea243b51cb2495b..ceb9f58157ad9bb471729ee302513c46988572bc 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -28,6 +28,7 @@
#ifndef CCTEST_H_
#define CCTEST_H_
+#include "include/libplatform/libplatform.h"
#include "src/v8.h"
#ifndef TEST
@@ -594,6 +595,13 @@ static inline void EnableDebugger() {
static inline void DisableDebugger() { v8::Debug::SetDebugEventListener(NULL); }
+static inline void EmptyMessageQueues(v8::Isolate* isolate) {
+ while (v8::platform::PumpMessageLoop(v8::internal::V8::GetCurrentPlatform(),
+ isolate))
+ ;
+}
+
+
// Helper class for new allocations tracking and checking.
// To use checking of JS allocations tracking in a test,
// just create an instance of this class.
« no previous file with comments | « src/list-inl.h ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698