File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,14 @@ class TypedArrayContents {
3131 v8::Local<v8::ArrayBuffer> buffer = array->Buffer ();
3232
3333 length = byte_length / sizeof (T);
34+ #if (V8_MAJOR_VERSION >= 10 || \
35+ (V8_MAJOR_VERSION == 10 && \
36+ (defined (V8_MINOR_VERSION) && V8_MINOR_VERSION >= 5 )) || \
37+ (NODE_MAJOR_VERSION == 18 && NODE_MINOR_VERSION >= 8 ))
38+ data = static_cast <char *>(buffer->Data ()) + byte_offset;
3439// Actually it's 7.9 here but this would lead to ABI issues with Node.js 13
3540// using 7.8 till 13.2.0.
36- #if (V8_MAJOR_VERSION >= 8)
41+ #elif (V8_MAJOR_VERSION >= 8)
3742 data = static_cast <char *>(buffer->GetBackingStore ()->Data ()) + byte_offset;
3843#else
3944 data = static_cast <char *>(buffer->GetContents ().Data ()) + byte_offset;
You can’t perform that action at this time.
0 commit comments