Skip to content

Commit

Permalink
replace GetContents() by GetBackingStore()
Browse files Browse the repository at this point in the history
  • Loading branch information
gabylb committed Jun 26, 2020
1 parent a965691 commit 647ace1
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit 647ace1

Please sign in to comment.