Bug 212028 - WebPageProxy::DidCommitLoadForFrame should use FrameLoadType instead of casting to/from uint32_t for IPC
Summary: WebPageProxy::DidCommitLoadForFrame should use FrameLoadType instead of casti...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-18 09:19 PDT by Alex Christensen
Modified: 2020-05-18 13:49 PDT (History)
2 users (show)

See Also:


Attachments
Patch (14.17 KB, patch)
2020-05-18 09:19 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (14.74 KB, patch)
2020-05-18 10:05 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].