-
Notifications
You must be signed in to change notification settings - Fork 332
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
Editorial: Fix realmless ArrayBuffer creation #1751
Conversation
This looks correct, but I wonder if we have test coverage for this. It also needs some wrapping adjustment, but happy to push a fix for that myself before landing. The longer term plan is to fix this more generally through Web IDL by making an ambient realm available to be used for creating (most) new objects. |
There are no tests for the realm of created objects at all, that I can find. I could add some but I'd be inventing the conventions.
Presumably that would apply to the first hunk (the one in |
Well, "ambient" was doing a lot of work there. The idea would be for Web IDL to handle these kind of cases correctly so nobody has to think about them again. If you could add a minimal |
… arrayBuffer(), a=testonly Automatic update from web-platform-tests Fetch: add test for realm of result of Response's arrayBuffer() For whatwg/fetch#1751. -- wpt-commits: ef64e9e98aff5f530368ee2213b01b5fe2acc2ec wpt-pr: 46104
… arrayBuffer(), a=testonly Automatic update from web-platform-tests Fetch: add test for realm of result of Response's arrayBuffer() For whatwg/fetch#1751. -- wpt-commits: ef64e9e98aff5f530368ee2213b01b5fe2acc2ec wpt-pr: 46104
Fixes #1675, maybe.
@annevk in that issue also points out that the extract a body [...] algorithm also creates a Uint8Array in an ad-hoc way, which I've also tried to fix. Unfortunately I don't know what realm to use there - unlike the original issue, these aren't method steps. I am guessing that when the realm is unspecified (which it very often isn't - for example, earlier in the same algorithm there is "set stream to a new ReadableStream object" without a realm argument), it's implicitly the current realm? But maybe we need to thread a realm argument into this algorithm (and quite a few others), or possibly just explicitly pass "the current realm".
(If this right I'll follow up with a PR for #1732.)
Preview | Diff