Skip to content
Closed
Prev Previous commit
Next Next commit
replace GetContents() by GetBackingStore()
  • Loading branch information
gabylb committed Jun 26, 2020
commit 647ace115668d433d0a84f44fdf1b455fb64fa52
4 changes: 4 additions & 0 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,11 @@ jvalueType javaGetArrayComponentType(JNIEnv *env, jobjectArray array) {
#if (NODE_VERSION_AT_LEAST(4, 0, 0))
v8::Local<v8::ArrayBuffer> newArrayBuffer(void* elems, size_t length) {
v8::Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), length);
#if (V8_MAJOR_VERSION >= 8)
memcpy(ab->GetBackingStore()->Data(), elems, length);
#else
memcpy(ab->GetContents().Data(), elems, length);
#endif
return ab;
}
#endif
Expand Down