Skip to content

Fix Buffer.from for SharedArrayBuffer - #259

Merged
feross merged 1 commit into
feross:masterfrom
mischnic:sharedarraybuffer
Mar 6, 2020
Merged

feross merged 1 commit into
feross:masterfrom
mischnic:sharedarraybuffer

Conversation

@mischnic

Copy link
Copy Markdown
Contributor

Closes #256

SharedArrayBuffer has the same properties as ArrayBuffer (new Uint8Array(sab) works, sab.byteLength exists), therefore fromArrayBuffer can be used.

@VictorQueiroz

Copy link
Copy Markdown

@feross Do we have an expectation to get this through? Very helpful for those like me, working with SharedArrayBuffer.

@mischnic

mischnic commented Mar 2, 2020

Copy link
Copy Markdown
Contributor Author

@feross ?

@feross feross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

@feross
feross merged commit 631d482 into feross:master Mar 6, 2020
@feross

feross commented Mar 6, 2020

Copy link
Copy Markdown
Owner

Published as 5.5.0.

@mischnic

mischnic commented Mar 6, 2020

Copy link
Copy Markdown
Contributor Author

Thank you! (But I still don't see the version on npm)

feross added a commit that referenced this pull request Mar 6, 2020
SharedArrayBuffer support originally added in #259
@feross

feross commented Mar 6, 2020

Copy link
Copy Markdown
Owner

Note: Before publishing 5.5.0, I had to add back support for browsers which lack SharedArrayBuffer support in this commit: ae2ab67

It's published now.

@mischnic

mischnic commented Mar 6, 2020

Copy link
Copy Markdown
Contributor Author

👍

totorokop pushed a commit to totorokop/react-native-buffer that referenced this pull request Aug 25, 2025
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.

Buffer.from with SharedArrayBuffer?

3 participants