Bug 251015 - [ResizeObserver] ASSERT(m_callback->hasCallback()) under ResizeObserver::deliverObservations
Summary: [ResizeObserver] ASSERT(m_callback->hasCallback()) under ResizeObserver::deli...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: cathiechen
URL:
Keywords: InRadar
: 250836 (view as bug list)
Depends on:
Blocks: 250836
  Show dependency treegraph
 
Reported: 2023-01-23 09:06 PST by cathiechen
Modified: 2023-06-14 00:38 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cathiechen 2023-01-23 09:06:43 PST
There is a ASSERTION FAILED if we set the initial last reported size of ResizeObservation to -1 x -1, which is updated in the speciation, see  https://github.com/WebKit/WebKit/pull/8839

If the initial size is 0x0, even ResizeObserver observe a disconnected target, it won't trigger ResizeObserver::deliverObservations.
If the initial size is -1x-1, observing a disconnected target would trigger ResizeObserver::deliverObservations, then there we meet a ASSERTION FAILED.
ResizeObserver needs a fix similar to https://bugs.webkit.org/show_bug.cgi?id=231235 


stderr:
ASSERTION FAILED: m_callback->hasCallback()
page/ResizeObserver.cpp(145) : void WebCore::ResizeObserver::deliverObservations()
1   0x13a15a5e4 WTFCrash
2   0x2808333e0 WTFCrashWithInfo(int, char const*, char const*, int)
3   0x284c63440 WebCore::ResizeObserver::deliverObservations()
4   0x283aa9074 WebCore::Document::deliverResizeObservations()
5   0x283aa937c WebCore::Document::updateResizeObservations(WebCore::Page&)
6   0x284bd6850 WebCore::Page::updateRendering()::$_29::operator()(WebCore::Document&) const
7   0x284bd67cc WTF::Detail::CallableWrapper<WebCore::Page::updateRendering()::$_29, void, WebCore::Document&>::call(WebCore::Document&)
8   0x283cc64b0 WTF::Function<void (WebCore::Document&)>::operator()(WebCore::Document&) const
9   0x284b90688 WebCore::Page::forEachDocumentFromMainFrame(WebCore::Frame const&, WTF::Function<void (WebCore::Document&)> const&)
10  0x284b80840 WebCore::Page::forEachDocument(WTF::Function<void (WebCore::Document&)> const&) const
11  0x284b88468 WebCore::Page::updateRendering()::$_20::operator()(WebCore::RenderingUpdateStep, WTF::Function<void (WebCore::Document&)> const&) const
12  0x284b88134 WebCore::Page::updateRendering()
13  0x11d05eb10 WebKit::WebPage::updateRendering()
14  0x11c1d7b94 WebKit::TiledCoreAnimationDrawingArea::updateRendering(WebKit::TiledCoreAnimationDrawingArea::UpdateRenderingType)
Comment 1 cathiechen 2023-01-25 07:35:24 PST
Pull request: https://github.com/WebKit/WebKit/pull/9112
Comment 2 Radar WebKit Bug Importer 2023-01-30 09:07:19 PST
<rdar://problem/104822969>
Comment 3 EWS 2023-02-01 02:51:24 PST
Committed 259673@main (2861d8c4e29c): <https://commits.webkit.org/259673@main>

Reviewed commits have been landed. Closing PR #9112 and removing active labels.
Comment 4 cathiechen 2023-02-01 02:54:45 PST
*** Bug 250836 has been marked as a duplicate of this bug. ***