[webkit-reviews] review granted: [Bug 179498] Add support for service worker generated redirections : [Attachment 327224] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 22 11:42:24 PST 2017


Darin Adler <darin at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 179498: Add support for service worker generated redirections
https://bugs.webkit.org/show_bug.cgi?id=179498

Attachment 327224: Patch

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




--- Comment #15 from Darin Adler <darin at apple.com> ---
Comment on attachment 327224
  --> https://bugs.webkit.org/attachment.cgi?id=327224
Patch

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

> Source/WebCore/platform/network/ResourceRequestBase.h:176
> +    WEBCORE_EXPORT static bool compare(const ResourceRequest&, const
ResourceRequest&);

A function named "compare" is confusing. What does "true" mean for "compare"?

> Source/WebCore/platform/network/ResourceResponseBase.h:50
> +    static bool isRedirectionStatusCode(int httpStatusCode) { return
httpStatusCode == 301 || httpStatusCode == 302 || httpStatusCode == 303 ||
httpStatusCode == 307 || httpStatusCode == 308; }

I think the argument could just be named "code" and this line would be a lot
shorter. And if HTTP is important then it should be in the function name; not
just the argument name.

> Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp:133
> +	   m_redirectionStatus = RedirectionStatus::None;
> +	   ASSERT_NOT_REACHED();

I suggest putting ASSERT_NOT_REACHED first.


More information about the webkit-reviews mailing list