Changeset 188991 in webkit


Ignore:
Timestamp:
Aug 26, 2015 2:54:41 PM (9 years ago)
Author:
Wenson Hsieh
Message:

Fix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
https://bugs.webkit.org/show_bug.cgi?id=148442
<rdar://problem/21609257>

Reviewed by Tim Horton.

A PlatformCAAnimationRemote's backpointer to a deallocated RemoteLayerTreeHost is not
invalidated when its host removes its reference to it.

  • UIProcess/mac/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::layerWillBeRemoved): Invalidate a backpointer from the

PlatformCAAnimationRemotes to the RemoteLayerTreeHost.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r188990 r188991  
     12015-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Fix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
     4        https://bugs.webkit.org/show_bug.cgi?id=148442
     5        <rdar://problem/21609257>
     6
     7        Reviewed by Tim Horton.
     8
     9        A PlatformCAAnimationRemote's backpointer to a deallocated RemoteLayerTreeHost is not
     10        invalidated when its host removes its reference to it.
     11
     12        * UIProcess/mac/RemoteLayerTreeHost.mm:
     13        (WebKit::RemoteLayerTreeHost::layerWillBeRemoved): Invalidate a backpointer from the
     14            PlatformCAAnimationRemotes to the RemoteLayerTreeHost.
     15
    1162015-08-26  Beth Dakin  <bdakin@apple.com>
    217
  • trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm

    r180965 r188991  
    139139void RemoteLayerTreeHost::layerWillBeRemoved(WebCore::GraphicsLayer::PlatformLayerID layerID)
    140140{
    141     m_animationDelegates.remove(layerID);
     141    auto iter = m_animationDelegates.find(layerID);
     142    if (iter != m_animationDelegates.end()) {
     143        [iter->value invalidate];
     144        m_animationDelegates.remove(iter);
     145    }
    142146    m_layers.remove(layerID);
    143147}
Note: See TracChangeset for help on using the changeset viewer.