Repository navigation
Conversation
6 tasks done
MattiasBuelens
force-pushed
the
reject-pending-reads-on-release
branch
from
December 15, 2021 23:05
5c4df18 to
04f6e39
Compare
MattiasBuelens
commented
Jan 11, 2022
Comment on lines
+218
to
+219
| }, 'ReadableStream with byte source: respondWithNewView() throws if the supplied view has a different offset ' + | ||
| '(in the readable state)'); |
Contributor
Author
There was a problem hiding this comment.
Drive-by fix: I noticed that this check was not covered by any tests, so I added one. π
MattiasBuelens
marked this pull request as ready for review
January 11, 2022 21:24
wpt-pr-bot
requested review from
domenic,
ricea,
wanderview,
youennf and
yutakahirano
January 11, 2022 21:24
ricea
approved these changes
Jan 12, 2022
| const read2 = reader2.read(new Uint8Array([4, 5])); | ||
| assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()'); | ||
| assert_equals(controller.byobRequest, byobRequest1, 'byobRequest should be unchanged'); | ||
| assert_array_equals([...new Uint8Array(byobRequest1.view.buffer)], [1, 2, 3], 'byobRequest.view.buffer should be unchanged'); |
Contributor
There was a problem hiding this comment.
I think it's not necessary to unwrap the Uint8Array with [...]. assert_array_equals doesn't check the types of the arguments are equal.
Contributor
Author
There was a problem hiding this comment.
It matters for format_value() though, when the array ends up in an error message. π€
This was referenced Jan 13, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See whatwg/streams#1168 for the accompanying spec change.