Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2fd467bcfa39e4fa05a89900fa0bbcfade56b9c9
      
https://github.com/WebKit/WebKit/commit/2fd467bcfa39e4fa05a89900fa0bbcfade56b9c9
  Author: Frédéric Wang <[email protected]>
  Date:   2026-01-29 (Thu, 29 Jan 2026)

  Changed paths:
    A 
LayoutTests/fast/scrolling/scroll-embed-with-content-visibility-hidden-crash-expected.txt
    A 
LayoutTests/fast/scrolling/scroll-embed-with-content-visibility-hidden-crash.html
    M Source/WebCore/dom/Document.cpp

  Log Message:
  -----------
  Document::updateLayout: reduce scope of checked pointer
https://bugs.webkit.org/show_bug.cgi?id=306514

Reviewed by Ryosuke Niwa and Geoffrey Garen.

After 306021@main introduced smart pointers in Document::updateLayout,
it's possible to hit an assertion when the checked pointer in
runForcedLayoutOnSkippedContentIfNeeded() goes out of scope at the end
of the function. Since this variable is only needed briefly, it's better
to reduce its scope as later calls in that method might delete the underlying
renderer object.

Test: fast/scrolling/scroll-embed-with-content-visibility-hidden-crash.html

* 
LayoutTests/fast/scrolling/scroll-embed-with-content-visibility-hidden-crash-expected.txt:
 Added.
* 
LayoutTests/fast/scrolling/scroll-embed-with-content-visibility-hidden-crash.html:
 Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateLayout): Reduce the scope of rootForLayout.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to