summaryrefslogtreecommitdiff
path: root/runtime/native/dalvik_system_DexFile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/native/dalvik_system_DexFile.cc')
-rw-r--r--runtime/native/dalvik_system_DexFile.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index f7f446542c..a1d4f16d26 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -488,10 +488,9 @@ static jclass DexFile_defineClassNative(JNIEnv* env,
return nullptr;
}
const std::string descriptor(DotToDescriptor(class_name.c_str()));
- const size_t hash(ComputeModifiedUtf8Hash(descriptor.c_str()));
+ const size_t hash = ComputeModifiedUtf8Hash(descriptor);
for (auto& dex_file : dex_files) {
- const dex::ClassDef* dex_class_def =
- OatDexFile::FindClassDef(*dex_file, descriptor.c_str(), hash);
+ const dex::ClassDef* dex_class_def = OatDexFile::FindClassDef(*dex_file, descriptor, hash);
if (dex_class_def != nullptr) {
ScopedObjectAccess soa(env);
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
@@ -507,6 +506,7 @@ static jclass DexFile_defineClassNative(JNIEnv* env,
}
ObjPtr<mirror::Class> result = class_linker->DefineClass(soa.Self(),
descriptor.c_str(),
+ descriptor.length(),
hash,
class_loader,
*dex_file,