diff options
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl-inl.h')
-rw-r--r-- | runtime/interpreter/interpreter_switch_impl-inl.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl-inl.h b/runtime/interpreter/interpreter_switch_impl-inl.h index ec152a5d07..ce0117f724 100644 --- a/runtime/interpreter/interpreter_switch_impl-inl.h +++ b/runtime/interpreter/interpreter_switch_impl-inl.h @@ -721,12 +721,11 @@ class InstructionHandler { const Instruction::ArrayDataPayload* payload = reinterpret_cast<const Instruction::ArrayDataPayload*>(payload_addr); ObjPtr<mirror::Object> obj = GetVRegReference(A()); + // If we have an active transaction, record old values before we overwrite them. + TransactionChecker::RecordArrayElementsInTransaction(obj, payload->element_count); if (!FillArrayData(obj, payload)) { return false; // Pending exception. } - if (transaction_active) { - RecordArrayElementsInTransaction(obj->AsArray(), payload->element_count); - } return true; } |