diff options
author | Sebastien Hertz <shertz@google.com> | 2015-03-03 13:39:30 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-03 13:39:31 +0000 |
commit | 775f1d4096efce112a3bd1e5897c84f898c5f7ce (patch) | |
tree | 44fbce76fdc2114947032cac69ad82aa93aee85c /runtime/runtime.cc | |
parent | cd93415651b7295d0bda1d37ef72ee99ba953c67 (diff) | |
parent | bd9cf9f6bbf285ec7a5b74ce655a9e68e0f6e434 (diff) | |
download | art-775f1d4096efce112a3bd1e5897c84f898c5f7ce.zip art-775f1d4096efce112a3bd1e5897c84f898c5f7ce.tar.gz art-775f1d4096efce112a3bd1e5897c84f898c5f7ce.tar.bz2 |
Merge "Follow-up 128393"
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r-- | runtime/runtime.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index edc55c8..383308c 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1560,15 +1560,17 @@ void Runtime::AbortTransactionAndThrowInternalError(Thread* self, const std::string& abort_message) { DCHECK(IsCompiler()); DCHECK(IsActiveTransaction()); + // Throwing an exception may cause its class initialization. If we mark the transaction + // aborted before that, we may warn with a false alarm. Throwing the exception before + // marking the transaction aborted avoids that. + preinitialization_transaction_->ThrowInternalError(self, false); preinitialization_transaction_->Abort(abort_message); - ThrowInternalErrorForAbortedTransaction(self); } void Runtime::ThrowInternalErrorForAbortedTransaction(Thread* self) { DCHECK(IsCompiler()); DCHECK(IsActiveTransaction()); - DCHECK(IsTransactionAborted()); - preinitialization_transaction_->ThrowInternalError(self); + preinitialization_transaction_->ThrowInternalError(self, true); } void Runtime::RecordWriteFieldBoolean(mirror::Object* obj, MemberOffset field_offset, |