ObjPtr<>-ify mirror::Object::As*(), fix stale refs in test.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Ia04c4996f5cbfa1f26acbadcd747342c57b1aac3
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index a106305..30c4b90 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -1833,12 +1833,12 @@
// TODO: Use ObjPtr here.
template<typename T>
-static void RecordArrayElementsInTransactionImpl(mirror::PrimitiveArray<T>* array,
+static void RecordArrayElementsInTransactionImpl(ObjPtr<mirror::PrimitiveArray<T>> array,
int32_t count)
REQUIRES_SHARED(Locks::mutator_lock_) {
Runtime* runtime = Runtime::Current();
for (int32_t i = 0; i < count; ++i) {
- runtime->RecordWriteArray(array, i, array->GetWithoutChecks(i));
+ runtime->RecordWriteArray(array.Ptr(), i, array->GetWithoutChecks(i));
}
}