Repository navigation
Conversation
This branch has not been deployed
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.
DataView bodies currently clone the full backing buffer, ignoring the selected offset and length. Wide typed-array bodies also lose bytes during
.text()conversion: a Uint16Array containing the bytes ofHello World!becomesHloWrd.Copy ArrayBufferView bodies into an ArrayBuffer using their byte offset and length, as required by BodyInit extraction. Use actual view type checks so an ordinary ArrayBuffer with a custom
bufferproperty still copies its own bytes. Retain native typed-array slicing before extracting the clone’s byte range, so view expando properties are ignored and shared Buffer-style slices still produce the correct ArrayBuffer. Preserve the DataView-to-Blob workaround. Add Request and Response consumption cases for DataView/Uint8Array subranges and Uint16Array bodies, and verify that.arrayBuffer()returns an ArrayBuffer.Validation: the original regressions produce eight failures before the change in Chrome. The ordinary-ArrayBuffer regression also fails before the actual view type check.
makepasses lint and builds; the completenpm testpasses after the change in Chrome and Firefox, both in the page and Web Worker suites (675 successful cases per suite, with browser feature skips).git diff --checkpasses. Firefox needed a home-visible temporary profile directory in this environment; IE/Edge were not exercised.AI disclosure: OpenAI Codex assisted with investigation, implementation, and validation.