Changeset 167273 in webkit
- Timestamp:
- Apr 14, 2014 3:37:07 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r167271 r167273 1 2014-04-14 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Hash table assertion closing a tab 4 https://bugs.webkit.org/show_bug.cgi?id=131640 5 6 Reviewed by Tim Horton. 7 8 Have RemoteLayerTreeContext keep track of all PlatformCALayerRemotes, 9 and clear their context pointer when it is being destroyed to avoid 10 calling into a deleted object later. 11 12 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 13 (WebKit::PlatformCALayerRemote::~PlatformCALayerRemote): 14 (WebKit::PlatformCALayerRemote::addAnimationForKey): 15 * WebProcess/WebPage/mac/PlatformCALayerRemote.h: 16 (WebKit::PlatformCALayerRemote::clearContext): 17 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h: 18 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm: 19 (WebKit::RemoteLayerTreeContext::~RemoteLayerTreeContext): 20 (WebKit::RemoteLayerTreeContext::layerWasCreated): 21 (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed): 22 1 23 2014-04-14 Tim Horton <timothy_horton@apple.com> 2 24 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r166886 r167273 110 110 for (const auto& layer : m_children) 111 111 toPlatformCALayerRemote(layer.get())->m_superlayer = nullptr; 112 m_context->layerWillBeDestroyed(this); 112 113 if (m_context) 114 m_context->layerWillBeDestroyed(this); 113 115 } 114 116 … … 287 289 m_properties.addedAnimations.set(key, toPlatformCAAnimationRemote(animation)->properties()); 288 290 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged); 289 290 m_context->willStartAnimationOnLayer(this); 291 292 if (m_context) 293 m_context->willStartAnimationOnLayer(this); 291 294 } 292 295 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h
r166545 r167273 154 154 RemoteLayerTreeTransaction::LayerProperties& properties() { return m_properties; } 155 155 156 void clearContext() { m_context = nullptr; } 157 156 158 protected: 157 159 PlatformCALayerRemote(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext* context); -
trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h
r166975 r167273 72 72 Vector<WebCore::GraphicsLayer::PlatformLayerID> m_destroyedLayers; 73 73 74 HashMap<WebCore::GraphicsLayer::PlatformLayerID, PlatformCALayerRemote*> m_liveLayers; 74 75 HashMap<WebCore::GraphicsLayer::PlatformLayerID, PlatformCALayerRemote*> m_layersAwaitingAnimationStart; 75 76 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm
r166975 r167273 50 50 RemoteLayerTreeContext::~RemoteLayerTreeContext() 51 51 { 52 for (auto& layer : m_liveLayers.values()) 53 layer->clearContext(); 52 54 } 53 55 … … 62 64 63 65 m_createdLayers.append(creationProperties); 66 m_liveLayers.add(layer->layerID(), layer); 64 67 } 65 68 66 69 void RemoteLayerTreeContext::layerWillBeDestroyed(PlatformCALayerRemote* layer) 67 70 { 71 m_liveLayers.remove(layer->layerID()); 72 68 73 ASSERT(!m_destroyedLayers.contains(layer->layerID())); 69 74 m_destroyedLayers.append(layer->layerID());
Note: See TracChangeset
for help on using the changeset viewer.