Clean up Handle usage.
Prefer using ConstHandle instead of Handle as function arguments
since you can't assign new references to ConstHandle which helps
prevent bugs.
Changed NullHandle to be a ConstHandle so that you can never modify
it to be a non null reference.
Change-Id: I81cb979f6f8d5b49e5614966a2caf28c3701dd4f
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index 4b37bef..81fbcab 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -65,6 +65,8 @@
namespace art {
struct ClassOffsets;
+template<class T> class ConstHandle;
+template<class T> class Handle;
class Signature;
class StringPiece;
@@ -981,7 +983,8 @@
uint16_t GetDirectInterfaceTypeIdx(uint32_t idx) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- static mirror::Class* GetDirectInterface(Thread* self, Handle<mirror::Class> klass, uint32_t idx)
+ static mirror::Class* GetDirectInterface(Thread* self, ConstHandle<mirror::Class> klass,
+ uint32_t idx)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
const char* GetSourceFile() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);