[webkit-reviews] review granted: [Bug 185840] Migrate From-Origin to Cross-Origin-Resource-Policy : [Attachment 341196] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 25 09:05:08 PDT 2018


Chris Dumez <cdumez at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 185840: Migrate From-Origin to Cross-Origin-Resource-Policy
https://bugs.webkit.org/show_bug.cgi?id=185840

Attachment 341196: Patch

https://bugs.webkit.org/attachment.cgi?id=341196&action=review




--- Comment #28 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 341196
  --> https://bugs.webkit.org/attachment.cgi?id=341196
Patch

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

> Source/WebCore/platform/network/HTTPParsers.cpp:900
> +CrossOriginResourcePolicy parseCrossOriginResourcePolicyHeader(const String&
header)

Since we're modifying it, the parameter should be a StringView (by value, not
reference), like the parseCrossOriginOptionsHeader() below.

> Source/WebCore/platform/network/HTTPParsers.cpp:913
> +    return CrossOriginResourcePolicy::Invalid;

Do we really need to distinguish Invalid? I think this could just return the
default (aka None).

> Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:139
> +    auto policy =
WebCore::parseCrossOriginResourcePolicyHeader(response.httpHeaderField(WebCore:
:HTTPHeaderName::CrossOriginResourcePolicy));

No need for all these WebCore::

> Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:141
> +    case WebCore::CrossOriginResourcePolicy::None:

No need for all these WebCore::


More information about the webkit-reviews mailing list