Title: [110356] trunk/Source/WebCore
Revision
110356
Author
[email protected]
Date
2012-03-09 18:09:15 -0800 (Fri, 09 Mar 2012)

Log Message

<rdar://problem/11018851> Crash in DisplayRefreshMonitor::notifyClients()
https://bugs.webkit.org/show_bug.cgi?id=80740

Reviewed by Sam Weinig.

No test, since this race condition cannot be reproduced reliably.

* platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
(WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor): Changed to stop the display link
first, then cancel any outstanding calls to refreshDisplayOnMainThread(). When doing things
the other way around, the display link can fire after outstanding calls have been canceled,
and enqueue new calls on the main thread, which will be dispatched after monitor destruction.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110355 => 110356)


--- trunk/Source/WebCore/ChangeLog	2012-03-10 02:04:07 UTC (rev 110355)
+++ trunk/Source/WebCore/ChangeLog	2012-03-10 02:09:15 UTC (rev 110356)
@@ -1,3 +1,18 @@
+2012-03-09  Dan Bernstein  <[email protected]>
+
+        <rdar://problem/11018851> Crash in DisplayRefreshMonitor::notifyClients()
+        https://bugs.webkit.org/show_bug.cgi?id=80740
+
+        Reviewed by Sam Weinig.
+
+        No test, since this race condition cannot be reproduced reliably.
+
+        * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
+        (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor): Changed to stop the display link
+        first, then cancel any outstanding calls to refreshDisplayOnMainThread(). When doing things
+        the other way around, the display link can fire after outstanding calls have been canceled,
+        and enqueue new calls on the main thread, which will be dispatched after monitor destruction.
+
 2012-03-09  Pratik Solanki  <[email protected]>
 
         Assertion failure in ResourceHandle::setDefersLoading(): d->m_defersLoading != defers

Modified: trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp (110355 => 110356)


--- trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp	2012-03-10 02:04:07 UTC (rev 110355)
+++ trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp	2012-03-10 02:09:15 UTC (rev 110356)
@@ -48,13 +48,13 @@
  
 DisplayRefreshMonitor::~DisplayRefreshMonitor()
 {
-    cancelCallOnMainThread(DisplayRefreshMonitor::refreshDisplayOnMainThread, this);
-    
     if (m_displayLink) {
         CVDisplayLinkStop(m_displayLink);
         CVDisplayLinkRelease(m_displayLink);
         m_displayLink = 0;
     }
+
+    cancelCallOnMainThread(DisplayRefreshMonitor::refreshDisplayOnMainThread, this);
 }
 
 bool DisplayRefreshMonitor::requestRefreshCallback()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to