summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_common.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r--runtime/interpreter/interpreter_common.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index 582843cab6..375d6445a1 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -467,16 +467,20 @@ static inline void AssignRegister(ShadowFrame* new_shadow_frame, const ShadowFra
}
}
-void AbortTransaction(Thread* self, const char* fmt, ...) {
- CHECK(Runtime::Current()->IsActiveTransaction());
- // Constructs abort message.
+void AbortTransactionF(Thread* self, const char* fmt, ...) {
va_list args;
va_start(args, fmt);
+ AbortTransactionV(self, fmt, args);
+ va_end(args);
+}
+
+void AbortTransactionV(Thread* self, const char* fmt, va_list args) {
+ CHECK(Runtime::Current()->IsActiveTransaction());
+ // Constructs abort message.
std::string abort_msg;
StringAppendV(&abort_msg, fmt, args);
// Throws an exception so we can abort the transaction and rollback every change.
Runtime::Current()->AbortTransactionAndThrowAbortError(self, abort_msg);
- va_end(args);
}
template<bool is_range, bool do_assignability_check>