-
Notifications
You must be signed in to change notification settings - Fork 238
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
Spec: Allow updating userBiddingSignals. #907
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
The only problem here is that parse a JSON string to an Infra value expects to be called within a valid ES realm (since it can throw errors, and it operates on JS objects). Unfortunately, this algorithm mostly runs in parallel (while at least one time, it does not). That doesn't seem great, although I realize this algorithm already has this bug from several lines above where we already call this algorithm.
This is in contrast with the Chromium implementation, which uses
JSONStringValueSerializer
which is vacuumed-off logic isolated from v8 and everything. I believe @jyasskin has raised this issue other times in this specification (maybe looking into a realm-agnostic method of doing the same thing), but I can't find any bugs on this spec, Web IDL, or Infra that represents this. Jeffrey, do you think we could benefit from JSON algorithms that aren't tied to a realm? In the meantime, I'm wondering if we should file a bug on this spec, and tag each instance of this with that bug for tracking.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.
Creating a bug for this and noting it everywhere we parse JSON [=in parallel=] SGTM.
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.
Infra should really let us do this: whatwg/infra#625.
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.
@jyasskin had a comment about we cannot create JS objects [=in parallel=]. For parsing JSON to infra value, "[=parse a JSON string to an Infra value=] involve creating JS objects also, but because those objects don't escape, it's clear how to implement it without actually creating them".
So we only moved [=parsing JSON bytes to a JavaScript value=] to algorithms that are within single realm, but kept [=parse a JSON string to an Infra value=] in algorithms that run [=in parallel=]. But a "realm-agnostic method" to parse json would be great.
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.
Thanks for filing that, I couldn't remember if you had already filed something like that or not. OK I think we should make an
Issue:
block next to this algorithm's usage and point to whatwg/infra#625 from there.