summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2017-04-03 17:35:17 -0700
committerTimothy Gu <timothygu99@gmail.com>2017-04-12 10:02:59 -0700
commitfaa447b256f61d46b4b4963d6bf3e77ccf229e97 (patch)
tree11b72c2f99d7f071cc342b80bb59eeaef0c34316 /src/util.h
parentec53921d2e96b4fd7672f69187f6b45b0ab96310 (diff)
downloadnode-new-faa447b256f61d46b4b4963d6bf3e77ccf229e97.tar.gz
src: allow ArrayBufferView as instance of Buffer
PR-URL: https://github.com/nodejs/node/pull/12223 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index f43ccef8b8..c924209a3c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -439,8 +439,8 @@ class BufferValue : public MaybeStackBuffer<char> {
} while (0)
#define SPREAD_BUFFER_ARG(val, name) \
- CHECK((val)->IsUint8Array()); \
- v8::Local<v8::Uint8Array> name = (val).As<v8::Uint8Array>(); \
+ CHECK((val)->IsArrayBufferView()); \
+ v8::Local<v8::ArrayBufferView> name = (val).As<v8::ArrayBufferView>(); \
v8::ArrayBuffer::Contents name##_c = name->Buffer()->GetContents(); \
const size_t name##_offset = name->ByteOffset(); \
const size_t name##_length = name->ByteLength(); \