-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
new Blob([new Uint16Array([1])]) has size 1 instead of 2 #40705
Labels
buffer
Issues and PRs related to the buffer subsystem.
Comments
Gozala
added a commit
to Gozala/node-1
that referenced
this issue
Nov 2, 2021
Linkgoron
pushed a commit
to Linkgoron/node
that referenced
this issue
Jan 31, 2022
Fixes: nodejs#40705 PR-URL: nodejs#40706 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v16.13.0
Platform
Darwin vashli.local 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
If you run following with node 16.3
node -e 'assert.equal(new (require("buffer").Blob)([new Uint16Array([1])]).size, 2)'
Produces output
Which mismatches expected
Blob
behaviorHow often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
assert should pass and generally blob behavior should match one from web
What do you see instead?
No response
Additional information
Issue with the following line
node/lib/internal/blob.js
Lines 109 to 128 in dd52c05
Which should return following instead
The text was updated successfully, but these errors were encountered: