From bf99f77dda749e2b653e8c45259b1fb56e7bb012 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Sat, 23 Aug 2014 16:37:27 -0700 Subject: 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 --- compiler/common_compiler_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/common_compiler_test.cc') diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index 18233665cd..db9dcd4b4b 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -367,7 +367,7 @@ void CommonCompilerTest::CompileMethod(mirror::ArtMethod* method) { MakeExecutable(method); } -void CommonCompilerTest::CompileDirectMethod(Handle class_loader, +void CommonCompilerTest::CompileDirectMethod(ConstHandle class_loader, const char* class_name, const char* method_name, const char* signature) { std::string class_descriptor(DotToDescriptor(class_name)); @@ -380,9 +380,9 @@ void CommonCompilerTest::CompileDirectMethod(Handle class_l CompileMethod(method); } -void CommonCompilerTest::CompileVirtualMethod(Handle class_loader, const char* class_name, - const char* method_name, const char* signature) -SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { +void CommonCompilerTest::CompileVirtualMethod(ConstHandle class_loader, + const char* class_name, const char* method_name, + const char* signature) { std::string class_descriptor(DotToDescriptor(class_name)); Thread* self = Thread::Current(); mirror::Class* klass = class_linker_->FindClass(self, class_descriptor.c_str(), class_loader); -- cgit v1.2.3