Changeset 110356 in webkit


Ignore:
Timestamp:
Mar 9, 2012 6:09:15 PM (12 years ago)
Author:
mitz@apple.com
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r110349 r110356  
     12012-03-09  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/11018851> Crash in DisplayRefreshMonitor::notifyClients()
     4        https://bugs.webkit.org/show_bug.cgi?id=80740
     5
     6        Reviewed by Sam Weinig.
     7
     8        No test, since this race condition cannot be reproduced reliably.
     9
     10        * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
     11        (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor): Changed to stop the display link
     12        first, then cancel any outstanding calls to refreshDisplayOnMainThread(). When doing things
     13        the other way around, the display link can fire after outstanding calls have been canceled,
     14        and enqueue new calls on the main thread, which will be dispatched after monitor destruction.
     15
    1162012-03-09  Pratik Solanki  <psolanki@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp

    r103361 r110356  
    4949DisplayRefreshMonitor::~DisplayRefreshMonitor()
    5050{
    51     cancelCallOnMainThread(DisplayRefreshMonitor::refreshDisplayOnMainThread, this);
    52    
    5351    if (m_displayLink) {
    5452        CVDisplayLinkStop(m_displayLink);
     
    5654        m_displayLink = 0;
    5755    }
     56
     57    cancelCallOnMainThread(DisplayRefreshMonitor::refreshDisplayOnMainThread, this);
    5858}
    5959
Note: See TracChangeset for help on using the changeset viewer.