Title: [198521] trunk/Source/WebCore
- Revision
- 198521
- Author
- [email protected]
- Date
- 2016-03-22 00:26:21 -0700 (Tue, 22 Mar 2016)
Log Message
[TextureMapper] Destructing TextureMapperLayer should clean up its effect target
https://bugs.webkit.org/show_bug.cgi?id=155718
Reviewed by Darin Adler.
TextureMapperLayer destructor should, in case of non-null effect target,
null out the effect target's mask and replica layer pointers if those
pointers point to the TextureMapperLayer object that's being destroyed,
avoiding use-after-free occurrences.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::~TextureMapperLayer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (198520 => 198521)
--- trunk/Source/WebCore/ChangeLog 2016-03-22 07:21:13 UTC (rev 198520)
+++ trunk/Source/WebCore/ChangeLog 2016-03-22 07:26:21 UTC (rev 198521)
@@ -1,5 +1,20 @@
2016-03-22 Zan Dobersek <[email protected]>
+ [TextureMapper] Destructing TextureMapperLayer should clean up its effect target
+ https://bugs.webkit.org/show_bug.cgi?id=155718
+
+ Reviewed by Darin Adler.
+
+ TextureMapperLayer destructor should, in case of non-null effect target,
+ null out the effect target's mask and replica layer pointers if those
+ pointers point to the TextureMapperLayer object that's being destroyed,
+ avoiding use-after-free occurrences.
+
+ * platform/graphics/texmap/TextureMapperLayer.cpp:
+ (WebCore::TextureMapperLayer::~TextureMapperLayer):
+
+2016-03-22 Zan Dobersek <[email protected]>
+
[TexMap] Shrink-to-fit the CompositingCoordinator's update atlases vector after cleanup
https://bugs.webkit.org/show_bug.cgi?id=155719
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (198520 => 198521)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2016-03-22 07:21:13 UTC (rev 198520)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2016-03-22 07:26:21 UTC (rev 198521)
@@ -444,6 +444,13 @@
child->m_parent = nullptr;
removeFromParent();
+
+ if (m_effectTarget) {
+ if (m_effectTarget->m_state.maskLayer == this)
+ m_effectTarget->m_state.maskLayer = nullptr;
+ if (m_effectTarget->m_state.replicaLayer == this)
+ m_effectTarget->m_state.replicaLayer = nullptr;
+ }
}
#if !USE(COORDINATED_GRAPHICS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes