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

Unified Diff: runtime/vm/compiler_test.cc

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review-comments Created 4 years, 11 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
Index: runtime/vm/compiler_test.cc
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc
index cab15939c33e2e5112f97713103485095de6d9a7..7655f7d73248f701df296a93c686453d9ad91639 100644
--- a/runtime/vm/compiler_test.cc
+++ b/runtime/vm/compiler_test.cc
@@ -8,9 +8,9 @@
#include "vm/compiler.h"
#include "vm/dart_api_impl.h"
#include "vm/object.h"
+#include "vm/safepoint.h"
#include "vm/symbols.h"
#include "vm/thread_pool.h"
-#include "vm/thread_registry.h"
#include "vm/unit_test.h"
namespace dart {
@@ -73,7 +73,7 @@ TEST_CASE(CompileFunction) {
}
-TEST_CASE(CompileFunctionOnHelperThread) {
+VM_TEST_CASE(CompileFunctionOnHelperThread) {
// Create a simple function and compile it without optimization.
const char* kScriptChars =
"class A {\n"
@@ -106,8 +106,7 @@ TEST_CASE(CompileFunctionOnHelperThread) {
Monitor* m = new Monitor();
MonitorLocker ml(m);
while (!func.HasOptimizedCode()) {
- Isolate::Current()->thread_registry()->CheckSafepoint();
- ml.Wait(1);
+ ml.WaitWithSafepointCheck(thread, 1);
}
BackgroundCompiler::Stop(isolate->background_compiler());
}
@@ -184,7 +183,7 @@ TEST_CASE(EvalExpression) {
}
-TEST_CASE(EvalExpressionWithLazyCompile) {
+VM_TEST_CASE(EvalExpressionWithLazyCompile) {
Library& lib = Library::Handle(Library::CoreLibrary());
const String& expression = String::Handle(String::New(
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/coverage_test.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698