From 01df4b3a9bb31f21f451452f0ce47632dd8916ad Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 5 Nov 2024 14:33:29 +0000 Subject: 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 --- runtime/class_table_test.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'runtime/class_table_test.cc') diff --git a/runtime/class_table_test.cc b/runtime/class_table_test.cc index 15cca6dda9..88530bcec8 100644 --- a/runtime/class_table_test.cc +++ b/runtime/class_table_test.cc @@ -80,10 +80,8 @@ TEST_F(ClassTableTest, ClassTable) { Handle class_loader(hs.NewHandle(soa.Decode(jclass_loader))); const char* descriptor_x = "LX;"; const char* descriptor_y = "LY;"; - Handle h_X( - hs.NewHandle(class_linker_->FindClass(soa.Self(), descriptor_x, class_loader))); - Handle h_Y( - hs.NewHandle(class_linker_->FindClass(soa.Self(), descriptor_y, class_loader))); + Handle h_X = hs.NewHandle(FindClass(descriptor_x, class_loader)); + Handle h_Y = hs.NewHandle(FindClass(descriptor_y, class_loader)); Handle obj_X = hs.NewHandle(h_X->AllocObject(soa.Self())); ASSERT_TRUE(obj_X != nullptr); ClassTable table; -- cgit v1.2.3-59-g8ed1b