Insert an empty read barrier call.
Bug: 12687968
Change-Id: Ie1d28658e16e09f6a983cb5c1f0d5b375b7ae069
diff --git a/runtime/gc/space/space_test.h b/runtime/gc/space/space_test.h
index 5c735df..9896a48 100644
--- a/runtime/gc/space/space_test.h
+++ b/runtime/gc/space/space_test.h
@@ -85,8 +85,13 @@
EXPECT_GE(size, SizeOfZeroLengthByteArray());
EXPECT_TRUE(byte_array_class != nullptr);
o->SetClass(byte_array_class);
- if (kUseBrooksReadBarrier) {
- o->SetReadBarrierPointer(o);
+ if (kUseBakerOrBrooksReadBarrier) {
+ // Like the proper heap object allocation, install and verify
+ // the correct read barrier pointer.
+ if (kUseBrooksReadBarrier) {
+ o->SetReadBarrierPointer(o);
+ }
+ o->AssertReadBarrierPointer();
}
mirror::Array* arr = o->AsArray<kVerifyNone>();
size_t header_size = SizeOfZeroLengthByteArray();