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
Handling of "then" on cross-origin windows doesn't match what we agreed to do or browsers #4251
Comments
Looks like this was wrong in the original PR for #3242 |
So to fix this, we need to remove the "then" case from step 3 of CrossOriginGetOwnPropertyHelper. Then we need to add a "then" case near the end of WindowProxy's and Location's [[GetOwnProperty]]. Alternatively we could move that entire step (step 3 of CrossOriginGetOwnPropertyHelper) to end of these two algorithms. It might be worthwhile to look into a shorthand for
too to avoid the duplication of that, but perhaps only if there's more uses of it throughout the platform. This seems like a good first issue for someone to try and tackle. |
In the Gecko implementation, I moved all of step 3 into a separate algorithm that is invoked from both ends of [[GetOwnProperty]], for the moment... |
This isn't strictly needed for @@toStringTag, @@hasInstance, and @@isConcatSpreadable, but "then" can be overridden and therefore cannot be handled earlier on. Handling them all at the same time leads to cleaner code. Tests: already tested by wpt. Fixes #4251.
I ended up posting a PR for this myself, despite "good first issue", as it concerns security, so removing that label. |
This isn't strictly needed for @@toStringTag, @@hasInstance, and @@isConcatSpreadable, but "then" can be overridden and therefore cannot be handled earlier on. Handling them all at the same time leads to cleaner code. Tests: already tested by wpt. Fixes #4251.
This isn't strictly needed for @@toStringTag, @@hasInstance, and @@isConcatSpreadable, but "then" can be overridden and therefore cannot be handled earlier on. Handling them all at the same time leads to cleaner code. Tests: already tested by wpt. Fixes whatwg#4251.
This isn't strictly needed for @@toStringTag, @@hasInstance, and @@isConcatSpreadable, but "then" can be overridden and therefore cannot be handled earlier on. Handling them all at the same time leads to cleaner code. Tests: already tested by wpt. Fixes whatwg#4251.
This isn't strictly needed for @@toStringTag, @@hasInstance, and @@isConcatSpreadable, but "then" can be overridden and therefore cannot be handled earlier on. Handling them all at the same time leads to cleaner code. Tests: already tested by wpt. Fixes whatwg#4251.
Consider this code, where "win" is a cross-origin window that has a subframe named "then":
What should this return?
Per spec as currently written, we land in https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-getownproperty and:
[[Value]]: undefined
But what browsers implement, and wpt tests for, and we agreed on, iirc, is that in this case the property descriptor's
[[Value]]
should be the subframe window.@annevk @domenic
The text was updated successfully, but these errors were encountered: