Ignore:
Timestamp:
Nov 19, 2009, 11:59:38 AM (16 years ago)
Author:
[email protected]
Message:

Fixing a bug in MessageQueue::removeIf() that leads to an
assertion failure.

Reviewed by Dmitry Titov.

https://bugs.webkit.org/show_bug.cgi?id=31657

  • wtf/MessageQueue.h:

(WTF::MessageQueue::removeIf):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/MessageQueue.h

    r50427 r51198  
    174174    {
    175175        MutexLocker lock(m_mutex);
    176         DequeConstIterator<DataType*> found = m_queue.end();
    177         while ((found = m_queue.findIf(predicate)) != m_queue.end()) {
     176        // See bug 31657 for why this loop looks so weird
     177        while (true) {
     178            DequeConstIterator<DataType*> found = m_queue.findIf(predicate);
     179            if (found == m_queue.end())
     180                break;
     181
    178182            DataType* message = *found;
    179183            m_queue.remove(found);
Note: See TracChangeset for help on using the changeset viewer.