Change indirect reference table to use ObjPtr

Bug: 31113334

Test: test-art-host

Change-Id: I340fdf430897ebd790ea4e35f94bcee776e98445
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index bb62f2d..7f50eb8 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -8270,7 +8270,7 @@
 
   // Make it a global ref and return.
   ScopedLocalRef<jobject> local_ref(
-      soa.Env(), soa.Env()->AddLocalReference<jobject>(h_path_class_loader.Get()));
+      soa.Env(), soa.Env()->AddLocalReference<jobject>(MakeObjPtr(h_path_class_loader.Get())));
   return soa.Env()->NewGlobalRef(local_ref.get());
 }