Bug 212028

Summary: WebPageProxy::DidCommitLoadForFrame should use FrameLoadType instead of casting to/from uint32_t for IPC
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Alex Christensen 2020-05-18 09:19:08 PDT
WebPageProxy::DidCommitLoadForFrame should use FrameLoadType instead of casting to/from uint32_t for IPC
Comment 1 Alex Christensen 2020-05-18 09:19:29 PDT
Created attachment 399650 [details]
Patch
Comment 2 Alex Christensen 2020-05-18 09:19:31 PDT
<rdar://problem/63343021>
Comment 3 Alex Christensen 2020-05-18 10:05:05 PDT
Created attachment 399653 [details]
Patch
Comment 4 David Kilzer (:ddkilzer) 2020-05-18 13:20:58 PDT
Comment on attachment 399653 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399653&action=review

r=me

> Source/WebKit/UIProcess/WebPageProxy.messages.in:128
> +    DidCommitLoadForFrame(WebCore::FrameIdentifier frameID, struct WebKit::FrameInfoData frameInfo, WebCore::ResourceRequest request, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, enum:uint8_t WebCore::FrameLoadType loadType, WebCore::CertificateInfo certificateInfo, bool usedLegacyTLS, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, enum:uint8_t WebCore::MouseEventPolicy mouseEventPolicy, WebKit::UserData userData)

I haven't seen `enum:uint8_t` used before.  Is this change so you don't have to tell messages.py about the header include for the type?  What happens if the size changes in the header where it's defined?
Comment 5 Alex Christensen 2020-05-18 13:23:21 PDT
Comment on attachment 399653 [details]
Patch

it's to tell messages.py to generate the declaration namespace WebCore { enum class FrameLoadType : uint8_t; }
If the size changes, this will cause build failures until you update all these.  That doesn't happen often, though.
Comment 6 EWS 2020-05-18 13:49:27 PDT
Committed r261829: <https://trac.webkit.org/changeset/261829>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399653 [details].