Bug 251584

Summary: Port the remaining WebCore/DOM types to the new serialization format
Product: WebKit Reporter: Gavin <gavin.p>
Component: WebKit Process ModelAssignee: Gavin <gavin.p>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 251900    
Bug Blocks:    

Description Gavin 2023-02-02 06:28:24 PST
Port the remaining WebCore/DOM types to the new serialization format
Comment 1 Radar WebKit Bug Importer 2023-02-02 06:29:56 PST
<rdar://problem/104959020>
Comment 2 Gavin 2023-02-02 09:48:47 PST
Pull request: https://github.com/WebKit/WebKit/pull/9531
Comment 3 EWS 2023-02-06 08:13:02 PST
Committed 259893@main (cbe22e46962f): <https://commits.webkit.org/259893@main>

Reviewed commits have been landed. Closing PR #9531 and removing active labels.
Comment 4 Chris Dumez 2023-02-07 19:44:46 PST
This caused imported/w3c/web-platform-tests/content-security-policy/reporting-api/reporting-api-works-on-frame-ancestors.https.sub.html to crash:
```
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   WebCore                       	       0x1480dd88c WebCore::ReportBody::reportBodyType() const + 12 (ReportBody.cpp:44)
1   WebCore                       	       0x1480efd14 WebCore::ReportingScope::notifyReportObservers(WTF::Ref<WebCore::Report, WTF::RawPtrTraits<WebCore::Report>>&&) + 204 (ReportingScope.cpp:96)
2   WebKit                        	       0x1162aecf8 WebKit::WebPage::notifyReportObservers(WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::FrameIdentifierType>>, WTF::Ref<WebCore::Report, WTF::RawPtrTraits<WebCore::Report>>&&) + 188 (WebPage.cpp:4653)
3   WebKit                        	       0x11635685c auto void IPC::callMemberFunction<WebKit::WebPage, WebKit::WebPage, void (WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::FrameIdentifierType>>, WTF::Ref<WebCore::Report, WTF::RawPtrTraits<WebCore::Report>>&&), std::__1::tuple<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::FrameIdentifierType>>, WTF::Ref<WebCore::Report, WTF::RawPtrTraits<WebCore::Report>>>>(WebKit::WebPage*, void (WebKit::WebPage::*)(WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::FrameIdentifierType>>, WTF::Ref<WebCore::Report, WTF::RawPtrTraits<WebCore::Report>>&&), std::__1::tuple<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::FrameIdentifierType>>, WTF::Ref<WebCore::Report, WTF::RawPtrTraits<WebCore::Report>>>&&)::'lambda'(auto&&...)::operator()<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::FrameIdentifierType>>, WTF::Ref<WebCore::Report, WTF::RawPtrTraits<WebCore::Report>>>(auto&&...) const + 204 (HandleMessage.h:136)

```
Comment 5 Chris Dumez 2023-02-07 19:46:19 PST
(In reply to Chris Dumez from comment #4)
> This caused
> imported/w3c/web-platform-tests/content-security-policy/reporting-api/
> reporting-api-works-on-frame-ancestors.https.sub.html to crash:
> ```
> Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
> 0   WebCore                       	       0x1480dd88c
> WebCore::ReportBody::reportBodyType() const + 12 (ReportBody.cpp:44)
> 1   WebCore                       	       0x1480efd14
> WebCore::ReportingScope::notifyReportObservers(WTF::Ref<WebCore::Report,
> WTF::RawPtrTraits<WebCore::Report>>&&) + 204 (ReportingScope.cpp:96)
> 2   WebKit                        	       0x1162aecf8
> WebKit::WebPage::notifyReportObservers(WebCore::ProcessQualified<WTF::
> ObjectIdentifier<WebCore::FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> WTF::RawPtrTraits<WebCore::Report>>&&) + 188 (WebPage.cpp:4653)
> 3   WebKit                        	       0x11635685c auto void
> IPC::callMemberFunction<WebKit::WebPage, WebKit::WebPage, void
> (WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::
> FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> WTF::RawPtrTraits<WebCore::Report>>&&),
> std::__1::tuple<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::
> FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> WTF::RawPtrTraits<WebCore::Report>>>>(WebKit::WebPage*, void
> (WebKit::WebPage::*)(WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore:
> :FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> WTF::RawPtrTraits<WebCore::Report>>&&),
> std::__1::tuple<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::
> FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> WTF::RawPtrTraits<WebCore::Report>>>&&)::'lambda'(auto&&...)::
> operator()<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::
> FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> WTF::RawPtrTraits<WebCore::Report>>>(auto&&...) const + 204
> (HandleMessage.h:136)
> 
> ```

See rdar://105129497
Comment 6 Chris Dumez 2023-02-07 20:24:52 PST
(In reply to Chris Dumez from comment #5)
> (In reply to Chris Dumez from comment #4)
> > This caused
> > imported/w3c/web-platform-tests/content-security-policy/reporting-api/
> > reporting-api-works-on-frame-ancestors.https.sub.html to crash:
> > ```
> > Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
> > 0   WebCore                       	       0x1480dd88c
> > WebCore::ReportBody::reportBodyType() const + 12 (ReportBody.cpp:44)
> > 1   WebCore                       	       0x1480efd14
> > WebCore::ReportingScope::notifyReportObservers(WTF::Ref<WebCore::Report,
> > WTF::RawPtrTraits<WebCore::Report>>&&) + 204 (ReportingScope.cpp:96)
> > 2   WebKit                        	       0x1162aecf8
> > WebKit::WebPage::notifyReportObservers(WebCore::ProcessQualified<WTF::
> > ObjectIdentifier<WebCore::FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> > WTF::RawPtrTraits<WebCore::Report>>&&) + 188 (WebPage.cpp:4653)
> > 3   WebKit                        	       0x11635685c auto void
> > IPC::callMemberFunction<WebKit::WebPage, WebKit::WebPage, void
> > (WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::
> > FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> > WTF::RawPtrTraits<WebCore::Report>>&&),
> > std::__1::tuple<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::
> > FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> > WTF::RawPtrTraits<WebCore::Report>>>>(WebKit::WebPage*, void
> > (WebKit::WebPage::*)(WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore:
> > :FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> > WTF::RawPtrTraits<WebCore::Report>>&&),
> > std::__1::tuple<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::
> > FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> > WTF::RawPtrTraits<WebCore::Report>>>&&)::'lambda'(auto&&...)::
> > operator()<WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::
> > FrameIdentifierType>>, WTF::Ref<WebCore::Report,
> > WTF::RawPtrTraits<WebCore::Report>>>(auto&&...) const + 204
> > (HandleMessage.h:136)
> > 
> > ```
> 
> See rdar://105129497

Uploading a fix via Bug 251900