Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "get unpartitioned cookie enabled state" algo #1
Add "get unpartitioned cookie enabled state" algo #1
Changes from 1 commit
e18913a
eebc47d
b4e4ab8
8c04605
87cd22d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't queue a task on the cookie store, only on a task source, see https://html.spec.whatwg.org/multipage/webappapis.html#task-source for some info (but yes it's complicated, the important bit here is that you need a task source to queue tasks, which is what you do when you want to manipulate renderer state after stepping into the browser process using "in parallel").
However, it's not entirely clear to me what this step does and why it's needed. I suppose this is still WIP and you would list out steps to get unpartitioned cookie state here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I am trying to translate what Chrome code is currently doing into text: https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/blink/renderer/core/dom/document.cc;l=5890-5897;drc=b8a0323a84f483b25e94b3a24d80fda16c5dd1ae.
It's currently making a sync function call to the CookieStore to get whether unpartitioned cookies are available.
Like you said in another comment, the cookie store concept is only loosely translated, and IIUC we want to make the spec queuing tasks to get info from other sources, this is the closest text I could come up with for now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL the latest draft PR, in which I did the following:
get unpartitioned cookie enabled state
algorithm incorporate more checks from hSA, and synchronous by checkingNavigator.cookieEnabled
; I am not sure what other spec source could be linked here, because AFAIK there is nothing to hold on to regarding the cookie part. This is also the current Chrome implementation.permissions task source
; I am not sure if this step should be removed; if we don't, then hSA is technically a sync method which reopens the issues hasStorageAccess() always queues a task to resolve with the environment's boolean? privacycg/storage-access#164 and Synchronous hasStorageAccess? privacycg/storage-access#146.get unpartitioned cookie enabled state
so that it does not runin parallel
(because the algorithm is sync now).