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
Drop IsDeprecatedWeakRefSmartPointerException for LocalDOMWindowObserver.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Chris Dumez
Pull request: https://github.com/WebKit/WebKit/pull/52726
EWS
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
<rdar://problem/163109752>
Diego Pino
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
Re-opening for pull request https://github.com/WebKit/WebKit/pull/52889
EWS
Committed 302070@main (cf6d1777a861): <https://commits.webkit.org/302070@main>
Reviewed commits have been landed. Closing PR #52889 and removing active labels.