Permalink
Browse files

node-syscall: Use Get instead of deprecated CloneElementAt. (#810)

Update Node.js version to 10.0.0.

CloneElementAt has been deprecated and removed in Node.js 10.0.0.
Replace it with Get, which is sufficient here.

Fixes #809.
  • Loading branch information...
myitcv authored and dmitshur committed Jun 28, 2018
1 parent 8dffc02 commit 5232e517d8951ce05c3b08f5bdefb1924f3f7979
Showing with 2 additions and 2 deletions.
  1. +1 −1 circle.yml
  2. +1 −1 node-syscall/syscall.cc
@@ -1,6 +1,6 @@
machine:
node:
version: 6.2.2
version: 10.0.0
environment:
SOURCE_MAP_SUPPORT: false
@@ -25,7 +25,7 @@ intptr_t toNative(Local<Value> value) {
Local<Array> array = Local<Array>::Cast(value);
intptr_t* native = reinterpret_cast<intptr_t*>(malloc(array->Length() * sizeof(intptr_t))); // TODO memory leak
for (uint32_t i = 0; i < array->Length(); i++) {
native[i] = toNative(array->CloneElementAt(i));
native[i] = toNative(array->Get(i));
}
return reinterpret_cast<intptr_t>(native);
}

0 comments on commit 5232e51

Please sign in to comment.