Skip to content
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

fix(ext/web): use primordials of ES2024 ArrayBuffer transfer #24396

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

petamoriken
Copy link
Contributor

@@ -1359,7 1350,7 @@ function readableByteStreamControllerEnqueue(controller, chunk) {
"chunk's buffer is detached and so cannot be enqueued",
);
}
const transferredBuffer = transferArrayBuffer(buffer);
const transferredBuffer = ArrayBufferPrototypeTransfer(buffer);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, [[ArrayBufferMaxByteLength]] internal slot is not carried over, so ArrayBufferPrototypeTransferToFixedLength should be used.
https://streams.spec.whatwg.org/#transfer-array-buffer

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

@bartlomieju bartlomieju merged commit d379c0b into denoland:main Jul 2, 2024
17 checks passed
bartlomieju pushed a commit to denoland/deno_core that referenced this pull request Jul 2, 2024
@petamoriken petamoriken deleted the fix/arraybuffer-transfer branch July 3, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants