Title: [89947] trunk/Source/WebKit2
Revision
89947
Author
[email protected]
Date
2011-06-28 12:01:29 -0700 (Tue, 28 Jun 2011)

Log Message

2011-06-28  Chang Shu  <[email protected]>

        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):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (89946 => 89947)


--- trunk/Source/WebKit2/ChangeLog	2011-06-28 18:35:37 UTC (rev 89946)
+++ trunk/Source/WebKit2/ChangeLog	2011-06-28 19:01:29 UTC (rev 89947)
@@ -1,3 +1,20 @@
+2011-06-28  Chang Shu  <[email protected]>
+
+        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):
+
 2011-06-28  Balazs Kelemen  <[email protected]>
 
         Reviewed by Kenneth Rohde Christiansen.

Modified: trunk/Source/WebKit2/Platform/qt/WorkQueueQt.cpp (89946 => 89947)


--- trunk/Source/WebKit2/Platform/qt/WorkQueueQt.cpp	2011-06-28 18:35:37 UTC (rev 89946)
+++ trunk/Source/WebKit2/Platform/qt/WorkQueueQt.cpp	2011-06-28 19:01:29 UTC (rev 89947)
@@ -107,8 +107,8 @@
 void WorkQueue::scheduleWork(PassOwnPtr<WorkItem> item)
 {
     WorkQueue::WorkItemQt* itemQt = new WorkQueue::WorkItemQt(this, item.leakPtr());
-    itemQt->startTimer(0);
     itemQt->moveToThread(m_workThread);
+    QMetaObject::invokeMethod(itemQt, "execute", Qt::QueuedConnection);
 }
 
 void WorkQueue::scheduleWorkAfterDelay(PassOwnPtr<WorkItem> item, double delayInSecond)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to