Skip to content

Commit 647ace1

Browse files
committed
replace GetContents() by GetBackingStore()
Ref: nodejs/node#30339
1 parent a965691 commit 647ace1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,11 @@ jvalueType javaGetArrayComponentType(JNIEnv *env, jobjectArray array) {
484484
#if (NODE_VERSION_AT_LEAST(4, 0, 0))
485485
v8::Local<v8::ArrayBuffer> newArrayBuffer(void* elems, size_t length) {
486486
v8::Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), length);
487+
#if (V8_MAJOR_VERSION >= 8)
488+
memcpy(ab->GetBackingStore()->Data(), elems, length);
489+
#else
487490
memcpy(ab->GetContents().Data(), elems, length);
491+
#endif
488492
return ab;
489493
}
490494
#endif

0 commit comments

Comments
 (0)