diff options
Diffstat (limited to 'runtime/jdwp/object_registry.h')
| -rw-r--r-- | runtime/jdwp/object_registry.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/runtime/jdwp/object_registry.h b/runtime/jdwp/object_registry.h index 27a4e55f41..4c149cdac7 100644 --- a/runtime/jdwp/object_registry.h +++ b/runtime/jdwp/object_registry.h @@ -23,6 +23,7 @@ #include <map> #include "base/casts.h" +#include "handle.h" #include "jdwp/jdwp.h" #include "safe_map.h" @@ -65,11 +66,23 @@ class ObjectRegistry { SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(Locks::thread_list_lock_, Locks::thread_suspend_count_lock_); + JDWP::RefTypeId AddRefType(mirror::Class* c) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(Locks::thread_list_lock_, Locks::thread_suspend_count_lock_); + template<class T> + JDWP::ObjectId Add(Handle<T> obj_h) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) + LOCKS_EXCLUDED(Locks::thread_list_lock_, + Locks::thread_suspend_count_lock_); + + JDWP::RefTypeId AddRefType(Handle<mirror::Class> c_h) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) + LOCKS_EXCLUDED(Locks::thread_list_lock_, + Locks::thread_suspend_count_lock_); + template<typename T> T Get(JDWP::ObjectId id, JDWP::JdwpError* error) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { if (id == 0) { @@ -98,7 +111,8 @@ class ObjectRegistry { jobject GetJObject(JDWP::ObjectId id) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); private: - JDWP::ObjectId InternalAdd(mirror::Object* o) + template<class T> + JDWP::ObjectId InternalAdd(Handle<T> obj_h) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(lock_, Locks::thread_list_lock_, |
