Changeset 89947 in webkit


Ignore:
Timestamp:
Jun 28, 2011 12:01:29 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-28 Chang Shu <cshu@webkit.org>

Reviewed by Andreas Kling.

[Qt][WK2] Random crashes in fast/frames/ tests
https://bugs.webkit.org/show_bug.cgi?id=63459

Investigation on the crashes has revealed that sometimes, a frame could
have been destroyed before it is removed from the hierachy in Qt WebKit2 UI process.
The root cause lies in the fact that the order of the two contiguous asynchronous
messages may not be respected on the receiving side. And it is Qt's implementation,
which uses QTimer::startTimer(0), that causes the reverse order. This patch replaces
the timer approach with QMetaObject::invokeMethod approach and no crash happens afterwards.

  • Platform/qt/WorkQueueQt.cpp: (WorkQueue::scheduleWork):
Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r89921 r89947  
     12011-06-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt][WK2] Random crashes in fast/frames/ tests
     6        https://bugs.webkit.org/show_bug.cgi?id=63459
     7
     8        Investigation on the crashes has revealed that sometimes, a frame could
     9        have been destroyed before it is removed from the hierachy in Qt WebKit2 UI process.
     10        The root cause lies in the fact that the order of the two contiguous asynchronous
     11        messages may not be respected on the receiving side. And it is Qt's implementation,
     12        which uses QTimer::startTimer(0), that causes the reverse order. This patch replaces
     13        the timer approach with QMetaObject::invokeMethod approach and no crash happens afterwards.
     14
     15        * Platform/qt/WorkQueueQt.cpp:
     16        (WorkQueue::scheduleWork):
     17
    1182011-06-28  Balazs Kelemen  <kbalazs@webkit.org>
    219
  • trunk/Source/WebKit2/Platform/qt/WorkQueueQt.cpp

    r79335 r89947  
    108108{
    109109    WorkQueue::WorkItemQt* itemQt = new WorkQueue::WorkItemQt(this, item.leakPtr());
    110     itemQt->startTimer(0);
    111110    itemQt->moveToThread(m_workThread);
     111    QMetaObject::invokeMethod(itemQt, "execute", Qt::QueuedConnection);
    112112}
    113113
Note: See TracChangeset for help on using the changeset viewer.