Revert "Revert "Make libdexfile build independent of runtime dir""
This reverts commit 787784f9effb126b5d0d3dc97d544c4a477b5daf.
Reason for revert: Bot configuration issue.
Change-Id: I6a10bb4a9571f89c7e4dd095f9157e830a44e2de
Bug: 22322814
Test: make -j 50 checkbuild
diff --git a/runtime/common_throws.cc b/runtime/common_throws.cc
index 03774f4..19e7f76 100644
--- a/runtime/common_throws.cc
+++ b/runtime/common_throws.cc
@@ -551,7 +551,7 @@
void ThrowNullPointerExceptionFromDexPC(bool check_address, uintptr_t addr) {
uint32_t throw_dex_pc;
ArtMethod* method = Thread::Current()->GetCurrentMethod(&throw_dex_pc);
- CodeItemInstructionAccessor accessor(method);
+ CodeItemInstructionAccessor accessor(method->DexInstructions());
CHECK_LT(throw_dex_pc, accessor.InsnsSizeInCodeUnits());
const Instruction& instr = accessor.InstructionAt(throw_dex_pc);
if (check_address && !IsValidImplicitCheck(addr, instr)) {