[webkit-changes] [WebKit/WebKit] cbebff: Potential crash when updating Interaction Regions ...
Etienne Segonzac
noreply at github.com
Sat Mar 23 13:23:46 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cbebffce13f3d12fb005b445138c9f312d886ecc
https://github.com/WebKit/WebKit/commit/cbebffce13f3d12fb005b445138c9f312d886ecc
Author: Etienne Segonzac <sgz at apple.com>
Date: 2024-03-23 (Sat, 23 Mar 2024)
Changed paths:
M LayoutTests/interaction-region/layer-tree.html
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm
Log Message:
-----------
Potential crash when updating Interaction Regions layers
<rdar://117358144>
Reviewed by David Kilzer.
When appending at the end of a sublayers array, we shouldn't look up
the `objectAtIndex` at this (out of bounds) position.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm:
(WebKit::updateLayersForInteractionRegions):
Add a comment and an assertion about the `insertionPoint` range.
Check for the appending case and skip the objectAtIndex lookup.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
(WebKit::RemoteLayerTreeNode::repositionInteractionRegionsContainerIfNeeded):
Add a comment and an assertion about the `insertionPoint` range.
Check for the appending case and skip the objectAtIndex lookup.
* LayoutTests/interaction-region/layer-tree.html:
Make the test a bit more readable and make sure we exercise the layer
reuse, layer move and layer append code paths.
No expectations change needed.
Originally-landed-as: 272448.238 at safari-7618-branch (a2d409b8eee9). rdar://124556170
Canonical link: https://commits.webkit.org/276602@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list