Bug 301181

Summary: Drop IsDeprecatedWeakRefSmartPointerException for LocalDOMWindowObserver
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Diego Pino <dpino>
Status: RESOLVED FIXED    
Severity: Normal CC: dpino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Chris Dumez
Reported 2025-10-21 02:22:18 PDT
Drop IsDeprecatedWeakRefSmartPointerException for LocalDOMWindowObserver.
Attachments
Chris Dumez
Comment 1 2025-10-21 02:33:34 PDT
EWS
Comment 2 2025-10-21 05:26:26 PDT
Committed 301873@main (ee9fa2e2e115): <https://commits.webkit.org/301873@main> Reviewed commits have been landed. Closing PR #52726 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-10-21 05:27:11 PDT
Diego Pino
Comment 4 2025-10-23 09:32:12 PDT
GTK3 build is failing after this patch with the following build error: https://build.webkit.org/#/builders/1519/builds/8007 ``` WTF/Headers/wtf/WeakPtr.h: In instantiation of ‘T* WTF::WeakPtr< <template-parameter-1-1>, WeakPtrImpl, <template-parameter-1-3> >::operator->() const [with T = WebKit::DOMObjectCacheFrameObserver; WeakPtrImpl = WTF::DefaultWeakPtrImpl; PtrTraits = WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl>]’: ../../../Source/WebKit/WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp:144:32: required from here WTF/Headers/wtf/WeakPtr.h:122:90: error: static assertion failed: Classes that offer weak pointers should also offer RefPtr or CheckedPtr. Please do not add new exceptions. 122 | HasRefPtrMemberFunctions<T>::value || HasCheckedPtrMemberFunctions<T>::value || IsDeprecatedWeakRefSmartPointerException<std::remove_cv_t<T>>::value, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Apparently the assertion is triggered due to this change: - https://github.com/WebKit/WebKit/pull/52726/files#diff-12c652d46981748b460f0ec706a0bae28589040a9c3eb43f3a172d1b6c487cf3R148 The patch modified m_frameObserver from a reference to WeakPtr and there are all data members in DOMWindowObserver are also WeakPtr. The only solution I found was to actually mark DOMObjectCacheFrameObserver as IsDeprecatedWeakRefSmartPointerException. I have no clue why this build error is happening only in the GTK3 build.
Diego Pino
Comment 5 2025-10-23 09:36:22 PDT
EWS
Comment 6 2025-10-23 22:02:53 PDT
Committed 302070@main (cf6d1777a861): <https://commits.webkit.org/302070@main> Reviewed commits have been landed. Closing PR #52889 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.