[webkit-reviews] review granted: [Bug 31657] MessageQueue::removeIf() has a bug that leads to failed assertions : [Attachment 43477] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 18 21:23:05 PST 2009


Dmitry Titov <dimich at chromium.org> has granted Dumitru Daniliuc
<dumi at chromium.org>'s request for review:
Bug 31657: MessageQueue::removeIf() has a bug that leads to failed assertions
https://bugs.webkit.org/show_bug.cgi?id=31657

Attachment 43477: patch
https://bugs.webkit.org/attachment.cgi?id=43477&action=review

------- Additional Comments from Dmitry Titov <dimich at chromium.org>
Cool catch! r=me

Please consider also this shape of the loop, it seems a bit simpler (if you
agree, it can be changed on landing):

while (true) {
    DequeConstIterator<DataType*> found = m_queue.findIf(predicate);
    if (found == m_queue.end())
	break;

    DataType* message = *found;
    m_queue.remove(found);
    delete message;
}


More information about the webkit-reviews mailing list