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

Unified Diff: runtime/vm/object_id_ring_test.cc

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo 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
« no previous file with comments | « runtime/vm/object_graph_test.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_id_ring_test.cc
diff --git a/runtime/vm/object_id_ring_test.cc b/runtime/vm/object_id_ring_test.cc
index 27347ea9b0f46d7ec6ffbe037940f9206dc0db5e..e2eda2e17d0960a850bf12b0833287bb2628c061 100644
--- a/runtime/vm/object_id_ring_test.cc
+++ b/runtime/vm/object_id_ring_test.cc
@@ -48,7 +48,7 @@ class ObjectIdRingTestHelper {
// Test that serial number wrapping works.
-TEST_CASE(ObjectIdRingSerialWrapTest) {
+VM_TEST_CASE(ObjectIdRingSerialWrapTest) {
Isolate* isolate = Isolate::Current();
ObjectIdRing* ring = isolate->object_id_ring();
ObjectIdRingTestHelper::SetCapacityAndMaxSerial(ring, 2, 4);
@@ -160,8 +160,11 @@ TEST_CASE(ObjectIdRingScavengeMoveTest) {
EXPECT_NE(Object::null(), raw_obj2);
EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj1));
EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj2));
- // Force a scavenge.
- heap->CollectGarbage(Heap::kNew);
+ {
+ TransitionNativeToVM transition(thread);
+ // Force a scavenge.
+ heap->CollectGarbage(Heap::kNew);
+ }
RawObject* raw_object_moved1 = ring->GetObjectForId(raw_obj_id1, &kind);
EXPECT_EQ(ObjectIdRing::kValid, kind);
RawObject* raw_object_moved2 = ring->GetObjectForId(raw_obj_id2, &kind);
@@ -187,7 +190,7 @@ TEST_CASE(ObjectIdRingScavengeMoveTest) {
// Test that the ring table is updated with nulls when the old GC collects.
-TEST_CASE(ObjectIdRingOldGCTest) {
+VM_TEST_CASE(ObjectIdRingOldGCTest) {
Isolate* isolate = thread->isolate();
Heap* heap = isolate->heap();
ObjectIdRing* ring = isolate->object_id_ring();
@@ -241,7 +244,7 @@ TEST_CASE(ObjectIdRingOldGCTest) {
// Test that the ring table correctly reports an entry as expired when it is
// overridden by new entries.
-TEST_CASE(ObjectIdRingExpiredEntryTest) {
+VM_TEST_CASE(ObjectIdRingExpiredEntryTest) {
Isolate* isolate = Isolate::Current();
ObjectIdRing* ring = isolate->object_id_ring();
« no previous file with comments | « runtime/vm/object_graph_test.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698