summaryrefslogtreecommitdiff
path: root/compiler/common_compiler_test.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-08-23 16:37:27 -0700
committerMathieu Chartier <mathieuc@google.com>2014-08-23 16:54:24 -0700
commitbf99f77dda749e2b653e8c45259b1fb56e7bb012 (patch)
tree98addbb3533c745781bc26e4a55cbbdd6d6e97e7 /compiler/common_compiler_test.cc
parent762f0a5bdd238458bbb463a9565388f2047a98d4 (diff)
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
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r--compiler/common_compiler_test.cc8
1 files changed, 4 insertions, 4 deletions
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<mirror::ClassLoader> class_loader,
+void CommonCompilerTest::CompileDirectMethod(ConstHandle<mirror::ClassLoader> 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<mirror::ClassLoader> class_l
CompileMethod(method);
}
-void CommonCompilerTest::CompileVirtualMethod(Handle<mirror::ClassLoader> class_loader, const char* class_name,
- const char* method_name, const char* signature)
-SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+void CommonCompilerTest::CompileVirtualMethod(ConstHandle<mirror::ClassLoader> 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);