Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 408fe7fd1e84633edbfa80484ee3163faaf7676a
      
https://github.com/WebKit/WebKit/commit/408fe7fd1e84633edbfa80484ee3163faaf7676a
  Author: Ryosuke Niwa <[email protected]>
  Date:   2025-03-16 (Sun, 16 Mar 2025)

  Changed paths:
    A LayoutTests/fullscreen/fullscreen-document-gc-crash-expected.txt
    A LayoutTests/fullscreen/fullscreen-document-gc-crash.html
    M Source/WebCore/dom/Element.cpp

  Log Message:
  -----------
  Release assertion failure (m_topLayerElements is not empty) in 
Document::removedLastRef
https://bugs.webkit.org/show_bug.cgi?id=289848

Reviewed by Tim Nguyen.

The release assertion was caused by a disconnected element entering fullscreen 
in the top layer.
Because a disconnected element may never receive Element::removedFromAncestor, 
this results in
the element being left in Document::m_topLayerElements even after 
removeDetachedChildren.

The bug was fixed by 291478@main. This PR adds a test for this particular crash 
and introduces
a new release assert in Element::addToTopLayer to catch a bug like this in an 
earlier point.

* LayoutTests/fullscreen/fullscreen-document-gc-crash-expected.txt: Added.
* LayoutTests/fullscreen/fullscreen-document-gc-crash.html: Added.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::addToTopLayer):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to