Changeset 174799 in webkit
- Timestamp:
- Oct 16, 2014 4:39:09 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r174791 r174799 1 2014-10-16 Simon Fraser <simon.fraser@apple.com> 2 3 Crash under RemoteLayerTreeHost::getLayer() when closing a tab 4 https://bugs.webkit.org/show_bug.cgi?id=137796 5 rdar://problem/18547565 6 7 Reviewed by Tim Horton. 8 9 CA can call our animation delegate after the RemoteLayerTreeHost has been 10 destroyed. CAAnimation retains its delegate, so it's safe for us to null out 11 the WKAnimationDelegate's pointer to the RemoteLayerTreeHost when tearing down 12 the RemoteLayerTreeHost. 13 14 * UIProcess/mac/RemoteLayerTreeHost.mm: 15 (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost): 16 (WebKit::RemoteLayerTreeHost::animationDidEnd): 17 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: 18 (-[WKAnimationDelegate invalidate]): 19 (-[WKAnimationDelegate animationDidStart:]): 20 (-[WKAnimationDelegate animationDidStop:finished:]): 21 1 22 2014-10-16 Tim Horton <timothy_horton@apple.com> 2 23 -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm
r172836 r174799 55 55 RemoteLayerTreeHost::~RemoteLayerTreeHost() 56 56 { 57 for (auto& delegate : m_animationDelegates.values()) 58 [delegate.get() invalidate]; 59 57 60 clearLayers(); 58 61 } … … 169 172 if (!animationKey.isEmpty()) 170 173 m_drawingArea.acceleratedAnimationDidEnd(layerID, animationKey); 171 172 174 } 173 175 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm
r174715 r174799 55 55 56 56 - (instancetype)initWithLayerID:(GraphicsLayer::PlatformLayerID)layerID layerTreeHost:(WebKit::RemoteLayerTreeHost*)layerTreeHost; 57 - (void)invalidate; 57 58 @end 58 59 … … 68 69 } 69 70 71 - (void)invalidate 72 { 73 _layerTreeHost = nullptr; 74 } 75 70 76 - (void)animationDidStart:(CAAnimation *)animation 71 77 { 78 if (!_layerTreeHost) 79 return; 80 72 81 bool hasExplicitBeginTime = [[animation valueForKey:WKExplicitBeginTimeFlag] boolValue]; 73 82 CFTimeInterval startTime; … … 85 94 - (void)animationDidStop:(CAAnimation *)animation finished:(BOOL)finished 86 95 { 96 if (!_layerTreeHost) 97 return; 98 87 99 _layerTreeHost->animationDidEnd(_layerID, animation); 88 100 }
Note: See TracChangeset
for help on using the changeset viewer.