From 813a86307e1f3437ed9d17aeea2c5c6ffcda5c67 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 29 Nov 2018 16:17:01 +0000 Subject: Use ArtMethod::GetDex{File,Cache}() more. Do not go through the declaring class when it can cause a DexFile or DexCache mismatch for obsolete methods. Also fix similar potential mismatch in hiddenapi. This is a follow-up to https://android-review.googlesource.com/834082 , https://android-review.googlesource.com/836008 . Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 119830111 Change-Id: I3fdf1aa1bc7bab816d5d8034b107506a32438b77 --- runtime/quick_exception_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/quick_exception_handler.cc') diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index afdfefaffa..d23f3e8e11 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -238,7 +238,7 @@ void QuickExceptionHandler::FindCatch(ObjPtr exception) { LOG(INFO) << "Handler is upcall"; } if (handler_method_ != nullptr) { - const DexFile* dex_file = handler_method_->GetDeclaringClass()->GetDexCache()->GetDexFile(); + const DexFile* dex_file = handler_method_->GetDexFile(); int line_number = annotations::GetLineNumFromPC(dex_file, handler_method_, handler_dex_pc_); LOG(INFO) << "Handler: " << handler_method_->PrettyMethod() << " (line: " << line_number << ")"; -- cgit v1.2.3-59-g8ed1b