diff options
author | 2024-11-05 14:33:29 +0000 | |
---|---|---|
committer | 2024-11-11 08:33:23 +0000 | |
commit | 01df4b3a9bb31f21f451452f0ce47632dd8916ad (patch) | |
tree | 2414f41e33f7c1ec468ea7c6f141267a6387d537 /compiler/jni/jni_compiler_test.cc | |
parent | 8a2ca0019489d3e1c5a79789af68fb05822af9cb (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 'compiler/jni/jni_compiler_test.cc')
-rw-r--r-- | compiler/jni/jni_compiler_test.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/jni/jni_compiler_test.cc b/compiler/jni/jni_compiler_test.cc index 2f4a1b5f44..35ee1edafd 100644 --- a/compiler/jni/jni_compiler_test.cc +++ b/compiler/jni/jni_compiler_test.cc @@ -243,8 +243,7 @@ class JniCompilerTest : public CommonCompilerTest { Handle<mirror::ClassLoader> loader( hs.NewHandle(soa.Decode<mirror::ClassLoader>(class_loader))); // Compile the native method before starting the runtime - Handle<mirror::Class> c = - hs.NewHandle(class_linker_->FindClass(self, "LMyClassNatives;", loader)); + Handle<mirror::Class> c = hs.NewHandle(FindClass("LMyClassNatives;", loader)); const auto pointer_size = class_linker_->GetImagePointerSize(); ArtMethod* method = c->FindClassMethod(method_name, method_sig, pointer_size); ASSERT_TRUE(method != nullptr) << method_name << " " << method_sig; |