Assert released transaction is != last in pool:
a cheap way to notice what went wrong in https://github.com/root-project/root/issues/7657.
This commit is contained in:
parent
2555c8f542
commit
4edb1ed0f2
@ -58,6 +58,8 @@ namespace cling {
|
|||||||
// Transaction T must be from call to TransactionPool::takeTransaction
|
// Transaction T must be from call to TransactionPool::takeTransaction
|
||||||
//
|
//
|
||||||
void releaseTransaction(Transaction* T, bool reuse = true) {
|
void releaseTransaction(Transaction* T, bool reuse = true) {
|
||||||
|
assert((m_Transactions.empty() || m_Transactions.back() != T) \
|
||||||
|
&& "Transaction already in pool");
|
||||||
if (reuse) {
|
if (reuse) {
|
||||||
assert((T->getState() == Transaction::kCompleted ||
|
assert((T->getState() == Transaction::kCompleted ||
|
||||||
T->getState() == Transaction::kRolledBack)
|
T->getState() == Transaction::kRolledBack)
|
||||||
|
Loading…
Reference in New Issue
Block a user