summaryrefslogtreecommitdiff
path: root/runtime/common_runtime_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-11-05 14:33:29 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2024-11-11 08:33:23 +0000
commit01df4b3a9bb31f21f451452f0ce47632dd8916ad (patch)
tree2414f41e33f7c1ec468ea7c6f141267a6387d537 /runtime/common_runtime_test.cc
parent8a2ca0019489d3e1c5a79789af68fb05822af9cb (diff)
Avoid `strlen()` for `ClassLinker::FindClass()`...
... and related functions in most cases. Note that the `CompilerDriver` previously resolved the `ClassLoader` and `TransactionAbortError` using the provided class loaders. We're now using the `ClassLoader` from the class roots and resolving the `TransactionAbortError` in the BCP class loader. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 181943478 Bug: 338123769 Change-Id: I38e480cdcdb8bf02c958e4d0773437f5766f6be0
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r--runtime/common_runtime_test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 165b3a9c8a..ab7ddbcb25 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -601,6 +601,12 @@ void CommonRuntimeTestImpl::GenerateProfile(ArrayRef<const std::string> dexes,
EXPECT_EQ(out_file->Flush(), 0);
}
+ObjPtr<mirror::Class> CommonRuntimeTestImpl::FindClass(
+ const char* descriptor,
+ Handle<mirror::ClassLoader> class_loader) const {
+ return class_linker_->FindClass(Thread::Current(), descriptor, strlen(descriptor), class_loader);
+}
+
CheckJniAbortCatcher::CheckJniAbortCatcher() : vm_(Runtime::Current()->GetJavaVM()) {
vm_->SetCheckJniAbortHook(Hook, &actual_);
}