ObjPtr misc cleanup
Check for subtypes in constructor.
Remove various calls to MakeObjPtr and ObjPtr::Ptr.
Bug: 31113334
Test: test-art-host
Change-Id: I8d680d514ea52cd64fc4f7c2e988926bc726174e
diff --git a/runtime/native/java_lang_reflect_Field.cc b/runtime/native/java_lang_reflect_Field.cc
index 86b42d0..90def44 100644
--- a/runtime/native/java_lang_reflect_Field.cc
+++ b/runtime/native/java_lang_reflect_Field.cc
@@ -46,8 +46,8 @@
}
ObjPtr<mirror::Class> calling_class;
if (!VerifyAccess(self,
- MakeObjPtr(obj),
- MakeObjPtr(field->GetDeclaringClass()),
+ obj,
+ field->GetDeclaringClass(),
field->GetAccessFlags(),
&calling_class,
1)) {
@@ -335,7 +335,7 @@
ObjPtr<mirror::Object> boxed_value = soa.Decode<mirror::Object>(javaValue);
JValue unboxed_value;
if (!UnboxPrimitiveForField(boxed_value,
- MakeObjPtr(field_type),
+ field_type,
f->GetArtField(),
&unboxed_value)) {
DCHECK(soa.Self()->IsExceptionPending());