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
Remove JavaScript realm dependency #219
Remove JavaScript realm dependency #219
Changes from 9 commits
e2e4725
8fd2654
5baf900
f2dc8dd
9ef78bf
d188a8d
32acfe3
52c1032
0d5c24d
fa9383e
a365f6d
46a8a05
0914443
e7b873d
84f8a34
6a3c376
29ef4bd
4fa6e48
8075951
9311ab2
d51ad85
17d8a18
4e893ec
bf7a7c0
0699d52
62f5ffa
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.
Hmm, this is a semantic change in the case where a
URLPattern
is provided -- it creates a second platform object wrapping the same URL pattern, rather than returning the existing one. If it were then exposed back to script (e.g., as the value of an attribute) it would no longer compare equal (===
), its expandos would be visibly different, etc.For the case where the author really does want a platform object because they might show it to script again, do we need to keep this? Should we have two versions of this algorithm, one which returns platform objects (and therefore takes a realm in case it needs to create them) and one which returns URL patterns?
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.
Good catch. Do we know who the callers would be? I'm not sure the "returns a platform object" version would have any callers, currently.
But if we did have such a caller, then I agree a separate algorithm would be best.
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.
For the SW static routing API usage, we actually do not provide the way to see data from JavaScript.
However, I do not have a good reason to block such use case from other APIs.
I tried to implement the algorithm with |realm| in addition.