Title: [276867] trunk/Source/WebCore
- Revision
- 276867
- Author
- [email protected]
- Date
- 2021-04-30 18:19:18 -0700 (Fri, 30 Apr 2021)
Log Message
Defend further against a PlatformCALayer's owner becoming null in PlatformCALayerCocoa::drawLayerContents.
https://bugs.webkit.org/show_bug.cgi?id=225250
<rdar://37608882>
Reviewed by Simon Fraser.
At the end of PlatformCALayer::drawLayerContents, we null check
layerContents for the platformCALayerShowRepaintCounter call but not
the platformCALayerIncrementRepaintCount call.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayer::drawLayerContents):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (276866 => 276867)
--- trunk/Source/WebCore/ChangeLog 2021-05-01 00:43:06 UTC (rev 276866)
+++ trunk/Source/WebCore/ChangeLog 2021-05-01 01:19:18 UTC (rev 276867)
@@ -1,5 +1,20 @@
2021-04-30 Cameron McCormack <[email protected]>
+ Defend further against a PlatformCALayer's owner becoming null in PlatformCALayerCocoa::drawLayerContents.
+ https://bugs.webkit.org/show_bug.cgi?id=225250
+ <rdar://37608882>
+
+ Reviewed by Simon Fraser.
+
+ At the end of PlatformCALayer::drawLayerContents, we null check
+ layerContents for the platformCALayerShowRepaintCounter call but not
+ the platformCALayerIncrementRepaintCount call.
+
+ * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+ (WebCore::PlatformCALayer::drawLayerContents):
+
+2021-04-30 Cameron McCormack <[email protected]>
+
Avoid a crash in PlatformCALayer::drawLayerContents when called with a display list recording GraphicsContext.
https://bugs.webkit.org/show_bug.cgi?id=225224
<rdar://76359027>
Modified: trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm (276866 => 276867)
--- trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm 2021-05-01 00:43:06 UTC (rev 276866)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm 2021-05-01 01:19:18 UTC (rev 276867)
@@ -1237,12 +1237,15 @@
// Re-fetch the layer owner, since <rdar://problem/9125151> indicates that it might have been destroyed during painting.
layerContents = platformCALayer->owner();
ASSERT(layerContents);
-
+
+ if (!layerContents)
+ return;
+
// Always update the repaint count so that it's accurate even if the count itself is not shown. This will be useful
// for the Web Inspector feeding this information through the LayerTreeAgent.
int repaintCount = layerContents->platformCALayerIncrementRepaintCount(platformCALayer);
- if (!platformCALayer->usesTiledBackingLayer() && layerContents && layerContents->platformCALayerShowRepaintCounter(platformCALayer))
+ if (!platformCALayer->usesTiledBackingLayer() && layerContents->platformCALayerShowRepaintCounter(platformCALayer))
drawRepaintIndicator(graphicsContext, platformCALayer, repaintCount);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes