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.cc b/runtime/mirror/class.cc
index 5b8eb82..760d54c 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -772,7 +772,8 @@
return GetInterfaceTypeList()->GetTypeItem(idx).type_idx_;
}
-mirror::Class* Class::GetDirectInterface(Thread* self, Handle<mirror::Class> klass, uint32_t idx) {
+mirror::Class* Class::GetDirectInterface(Thread* self, ConstHandle<mirror::Class> klass,
+ uint32_t idx) {
DCHECK(klass.Get() != nullptr);
DCHECK(!klass->IsPrimitive());
if (klass->IsArrayClass()) {