Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
REGRESSION: Occasional assertion failure in JSEventListener::ensureJS…
…Function via HTMLSlotElement::dispatchSlotChangeEvent() https://bugs.webkit.org/show_bug.cgi?id=243867 Reviewed by Wenson Hsieh. The bug was caused by ManualSlotAssignment enqueueing slotchange event on a shadow tree that has already started getting destructed unlike NamedSlotAssignment which avoided this by checking ShadowRoot::shouldFireSlotchangeEvent(). Fixed the bug by checking ShadowRoot::shouldFireSlotchangeEvent() in ManualSlotAssignment. Unfortunately no new tests since we don't have a reliable way of reproducing this assertion failure. * Source/WebCore/dom/SlotAssignment.cpp: (WebCore::ManualSlotAssignment::addSlotElementByName): (WebCore::ManualSlotAssignment::removeSlotElementByName): (WebCore::ManualSlotAssignment::slotManualAssignmentDidChange): (WebCore::ManualSlotAssignment::didRemoveManuallyAssignedNode): (WebCore::ManualSlotAssignment::willRemoveAssignedNode): Canonical link: https://commits.webkit.org/253365@main
- Loading branch information