[webkit-reviews] review granted: [Bug 205326] Implement "create a potential-CORS request" : [Attachment 388215] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 20 01:57:44 PST 2020


youenn fablet <youennf at gmail.com> has granted  review:
Bug 205326: Implement "create a potential-CORS request"
https://bugs.webkit.org/show_bug.cgi?id=205326

Attachment 388215: Patch

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




--- Comment #30 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 388215
  --> https://bugs.webkit.org/attachment.cgi?id=388215
Patch

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

> Source/WebCore/loader/CrossOriginAccessControl.cpp:140
> +    options.storedCredentialsPolicy = credentials ==
FetchOptions::Credentials::Include ? StoredCredentialsPolicy::Use :
document.securityOrigin().canRequest(request.url()) ?
StoredCredentialsPolicy::Use : StoredCredentialsPolicy::DoNotUse;

Can we write it with something like:
switch (credentials) {
case FetchOptions::Credentials::Omit:
   ...
case FetchOptions::Credentials::Omit:
   ...
case FetchOptions::Credentials::Include:
   ...
case FetchOptions::Credentials::SameOrigin:
   ...
}
This should be easier to use and we would also ensure consistency between the
two values (for instance omit => DoNotUse).


More information about the webkit-reviews mailing list