diff options
Diffstat (limited to 'runtime/entrypoints/quick')
-rw-r--r-- | runtime/entrypoints/quick/quick_trampoline_entrypoints.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index 9f30190..f9486c3 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc @@ -561,9 +561,11 @@ extern "C" const void* artQuickResolutionTrampoline(mirror::ArtMethod* called, caller->GetDexCacheResolvedMethods()->Set(called->GetDexMethodIndex(), called); } else { // Calling from one dex file to another, need to compute the method index appropriate to - // the caller's dex file. + // the caller's dex file. Since we get here only if the original called was a runtime + // method, we've got the correct dex_file and a dex_method_idx from above. + DCHECK(&MethodHelper(caller).GetDexFile() == dex_file); uint32_t method_index = - MethodHelper(called).FindDexMethodIndexInOtherDexFile(MethodHelper(caller).GetDexFile()); + MethodHelper(called).FindDexMethodIndexInOtherDexFile(*dex_file, dex_method_idx); if (method_index != DexFile::kDexNoIndex) { caller->GetDexCacheResolvedMethods()->Set(method_index, called); } |