Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-11-13 22:22:46 +0300
committerAnna Henningsen <anna@addaleax.net>2019-11-19 16:02:22 +0300
commite5d3c8121dd0bcc4dbf52c7b3a0521e359363a05 (patch)
tree9e7fac09163e14246056bc64228388e78c45e874 /src/node_internals.h
parent6cb8e4b12cd16ae8ed126f98458efb78312cabf6 (diff)
src: expose ArrayBuffer version of Buffer::New()
This can be useful to create `Buffer` instances for already-existing `ArrayBuffer`s, e.g. ones created manually from a backing store with a free callback (of which our variant in the public API has some limitations). PR-URL: https://github.com/nodejs/node/pull/30476 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index 10ef3bf5ed2..2bd0ff78da7 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -157,7 +157,7 @@ v8::MaybeLocal<v8::Object> New(Environment* env,
char* data,
size_t length,
bool uses_malloc);
-// Creates a Buffer instance over an existing Uint8Array.
+// Creates a Buffer instance over an existing ArrayBuffer.
v8::MaybeLocal<v8::Uint8Array> New(Environment* env,
v8::Local<v8::ArrayBuffer> ab,
size_t byte_offset,