Changeset 92050 in webkit


Ignore:
Timestamp:
Jul 30, 2011 4:43:07 AM (13 years ago)
Author:
kbalazs@webkit.org
Message:

MessageQueue::waitForMessageFilteredWithTimeout can triggers an assertion
https://bugs.webkit.org/show_bug.cgi?id=65263

Reviewed by Dmitry Titov.

  • wtf/Deque.h:

(WTF::::operator): Don't check the validity of an iterator
that will be reassigned right now.

  • wtf/MessageQueue.h:

(WTF::::removeIf): Revert r51198 as I beleave this is the better
solution for the problem that was solved by that.

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r92046 r92050  
     12011-07-30  Balazs Kelemen  <kbalazs@webkit.org>
     2
     3        MessageQueue::waitForMessageFilteredWithTimeout can triggers an assertion
     4        https://bugs.webkit.org/show_bug.cgi?id=65263
     5
     6        Reviewed by Dmitry Titov.
     7
     8        * wtf/Deque.h:
     9        (WTF::::operator): Don't check the validity of an iterator
     10        that will be reassigned right now.
     11        * wtf/MessageQueue.h:
     12        (WTF::::removeIf): Revert r51198 as I beleave this is the better
     13        solution for the problem that was solved by that.
     14
    1152011-07-29  Filip Pizlo  <fpizlo@apple.com>
    216
  • trunk/Source/JavaScriptCore/wtf/Deque.h

    r90629 r92050  
    614614    inline DequeIteratorBase<T, inlineCapacity>& DequeIteratorBase<T, inlineCapacity>::operator=(const Base& other)
    615615    {
    616         checkValidity();
    617616        other.checkValidity();
    618617        removeFromIteratorsList();
  • trunk/Source/JavaScriptCore/wtf/MessageQueue.h

    r85603 r92050  
    173173    {
    174174        MutexLocker lock(m_mutex);
    175         // See bug 31657 for why this loop looks so weird
    176         while (true) {
    177             DequeConstIterator<DataType*> found = m_queue.findIf(predicate);
    178             if (found == m_queue.end())
    179                 break;
    180 
     175        DequeConstIterator<DataType*> found = m_queue.end();
     176        while ((found = m_queue.findIf(predicate)) != m_queue.end()) {
    181177            DataType* message = *found;
    182178            m_queue.remove(found);
    183179            delete message;
    184        }
     180        }
    185181    }
    186182
Note: See TracChangeset for help on using the changeset viewer.