diff options
Diffstat (limited to 'node_modules/nan/nan_typedarray_contents.h')
-rw-r--r-- | node_modules/nan/nan_typedarray_contents.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/node_modules/nan/nan_typedarray_contents.h b/node_modules/nan/nan_typedarray_contents.h index d28ae32..c6ac8a4 100644 --- a/node_modules/nan/nan_typedarray_contents.h +++ b/node_modules/nan/nan_typedarray_contents.h @@ -31,7 +31,13 @@ class TypedArrayContents { v8::Local<v8::ArrayBuffer> buffer = array->Buffer(); length = byte_length / sizeof(T); - data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset; +// Actually it's 7.9 here but this would lead to ABI issues with Node.js 13 +// using 7.8 till 13.2.0. +#if (V8_MAJOR_VERSION >= 8) + data = static_cast<char*>(buffer->GetBackingStore()->Data()) + byte_offset; +#else + data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset; +#endif } #else |