Unverified Commit 31975bbc authored by Anna Henningsen's avatar Anna Henningsen
Browse files

src: allow not materializing ArrayBuffers from C++

Where appropriate, use a helper that wraps around
`ArrayBufferView::Buffer()` or `ArrayBufferView::CopyContents()`
rather than `Buffer::Data()`, as that may help to avoid materializing
the underlying `ArrayBuffer` when reading small typed arrays from C++.
This allows keeping the performance benefits of the faster creation of
heap-allocated small typed arrays in many cases.

PR-URL: https://github.com/nodejs/node/pull/26301


Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent b42dcb0e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment