Skip to content

Commit 9511261

Browse files
addaleaxjasnell
authored andcommitted
src: fix size underflow in CallbackQueue
Only decrease the size when actually removing items. PR-URL: #34662 Fixes: #34657 Refs: #34572 Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 014feec commit 9511261

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/callback_queue-inl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ CallbackQueue<R, Args...>::Shift() {
2222
head_ = ret->get_next();
2323
if (!head_)
2424
tail_ = nullptr; // The queue is now empty.
25+
size_--;
2526
}
26-
size_--;
2727
return ret;
2828
}
2929

0 commit comments

Comments
 (0)