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/reference_table.h b/runtime/reference_table.h
index 992ded0..8423e04 100644
--- a/runtime/reference_table.h
+++ b/runtime/reference_table.h
@@ -25,6 +25,7 @@
#include "base/allocator.h"
#include "base/mutex.h"
#include "gc_root.h"
+#include "obj_ptr.h"
#include "object_callbacks.h"
namespace art {
@@ -41,9 +42,9 @@
ReferenceTable(const char* name, size_t initial_size, size_t max_size);
~ReferenceTable();
- void Add(mirror::Object* obj) REQUIRES_SHARED(Locks::mutator_lock_);
+ void Add(ObjPtr<mirror::Object> obj) REQUIRES_SHARED(Locks::mutator_lock_);
- void Remove(mirror::Object* obj) REQUIRES_SHARED(Locks::mutator_lock_);
+ void Remove(ObjPtr<mirror::Object> obj) REQUIRES_SHARED(Locks::mutator_lock_);
size_t Size() const;