Bug 203428 - Storage Access API: Make the API work with the experimental 3rd-party cookie blocking
Summary: Storage Access API: Make the API work with the experimental 3rd-party cookie ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-25 12:15 PDT by John Wilander
Modified: 2019-10-28 12:45 PDT (History)
5 users (show)

See Also:


Attachments
Patch (88.31 KB, patch)
2019-10-25 12:47 PDT, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2019-10-25 12:15:59 PDT
The experimental 3rd-party cookie blocking that landed in <https://trac.webkit.org/changeset/251467> needs support in the Storage Access API.
Comment 1 Radar WebKit Bug Importer 2019-10-25 12:16:33 PDT
<rdar://problem/56626949>
Comment 2 John Wilander 2019-10-25 12:47:10 PDT
Created attachment 381956 [details]
Patch
Comment 3 katherine_cheney 2019-10-26 07:28:37 PDT
Comment on attachment 381956 [details]
Patch

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

Looks good to me! I'd give it an r+ if I could :)

> Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:1810
> +

Since ensureResourceStatisticsForRegistrableDomain(subFrameDomain) is always called before this function, I don't think the hasNoEntry check is needed (I know you didn't write this code, it was probably me who did this). Removing it would simplify this function a bit and let it match the memory store almost exactly. That being said, it doesn't hurt anyone to keep it in.
Comment 4 katherine_cheney 2019-10-26 07:29:49 PDT
(In reply to Katherine_cheney from comment #3)
> Comment on attachment 381956 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=381956&action=review
> 
> Looks good to me! I'd give it an r+ if I could :)
> 
> > Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:1810
> > +
> 
> Since ensureResourceStatisticsForRegistrableDomain(subFrameDomain) is always
> called before this function, I don't think the hasNoEntry check is needed (I
> know you didn't write this code, it was probably me who did this). Removing
> it would simplify this function a bit and let it match the memory store
> almost exactly. That being said, it doesn't hurt anyone to keep it in.

"this function" being cookieAccess
Comment 5 John Wilander 2019-10-26 07:49:36 PDT
(In reply to Katherine_cheney from comment #3)
> Comment on attachment 381956 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=381956&action=review
> 
> Looks good to me! I'd give it an r+ if I could :)

Thanks for taking a look. You’re always a bit worried touching code someone else has been working a lot on.

> > Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:1810
> > +
> 
> Since ensureResourceStatisticsForRegistrableDomain(subFrameDomain) is always
> called before this function, I don't think the hasNoEntry check is needed (I
> know you didn't write this code, it was probably me who did this). Removing
> it would simplify this function a bit and let it match the memory store
> almost exactly. That being said, it doesn't hurt anyone to keep it in.

I has that thought but figured there was a reason for the code to be there. I’ll try to remove before landing.
Comment 6 John Wilander 2019-10-28 12:02:11 PDT
Thank you, Alex! Let's see if I need to rebase or not. :)
Comment 7 WebKit Commit Bot 2019-10-28 12:45:11 PDT
Comment on attachment 381956 [details]
Patch

Clearing flags on attachment: 381956

Committed r251663: <https://trac.webkit.org/changeset/251663>
Comment 8 WebKit Commit Bot 2019-10-28 12:45:12 PDT
All reviewed patches have been landed.  Closing bug.