Move remaining jobject related functions to use ObjPtr
Also added ObjPtr::DownCast.
Bug: 31113334
Test: test-art-host
Change-Id: I59c253211dc435579ffdfd49f856861ab13d262c
diff --git a/runtime/gc/space/space_test.h b/runtime/gc/space/space_test.h
index 17d7c87..7778871 100644
--- a/runtime/gc/space/space_test.h
+++ b/runtime/gc/space/space_test.h
@@ -62,7 +62,7 @@
byte_array_class_ = self->GetJniEnv()->NewLocalRef(byte_array_class);
EXPECT_TRUE(byte_array_class_ != nullptr);
}
- return reinterpret_cast<mirror::Class*>(self->DecodeJObject(byte_array_class_));
+ return self->DecodeJObject(byte_array_class_)->AsClass();
}
mirror::Object* Alloc(space::MallocSpace* alloc_space,