Skip to content

Commit

Permalink
Cherry-pick 0c592c9. rdar://105887621
Browse files Browse the repository at this point in the history
    Crash under ScrollingStateFixedNode::reconcileLayerPositionForViewportRect
    https://bugs.webkit.org/show_bug.cgi?id=270361
    rdar://105887621

    Reviewed by Simon Fraser.

    We need a similar fix to #17453 as there is
    the same crash signature under ScrollingStateFixedNode::reconcileLayerPositionForViewportRect
    this time.

    * Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp:
    (WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):

    Canonical link: https://commits.webkit.org/275574@main

Identifier: 272448.679@safari-7618-branch
  • Loading branch information
nmoucht authored and Dan Robson committed Mar 4, 2024
1 parent 98e53a5 commit 6581d98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ void ScrollingStateFixedNode::reconcileLayerPositionForViewportRect(const Layout
FloatPoint position = m_constraints.layerPositionForViewportRect(viewportRect);
if (layer().representsGraphicsLayer()) {
auto* graphicsLayer = static_cast<GraphicsLayer*>(layer());
ASSERT(graphicsLayer);
// Crash data suggest that graphicsLayer can be null: rdar://105887621.
if (!graphicsLayer)
return;

LOG_WITH_STREAM(Scrolling, stream << "ScrollingStateFixedNode " << scrollingNodeID() <<" reconcileLayerPositionForViewportRect " << action << " position of layer " << graphicsLayer->primaryLayerID() << " to " << position);

Expand Down

0 comments on commit 6581d98

Please sign in to comment.