Changeset 51198 in webkit


Ignore:
Timestamp:
Nov 19, 2009 11:59:38 AM (14 years ago)
Author:
dumi@chromium.org
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):

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r51197 r51198  
     12009-11-19  Dumitru Daniliuc  <dumi@chromium.org>
     2
     3        Reviewed by Dmitry Titov.
     4
     5        Fixing a bug in MessageQueue::removeIf() that leads to an
     6        assertion failure.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=31657
     9
     10        * wtf/MessageQueue.h:
     11        (WTF::MessageQueue::removeIf):
     12
    1132009-11-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    214
  • 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.