Skip to content

Commit

Permalink
node-syscall: Use Get instead of deprecated CloneElementAt. (#810)
Browse files Browse the repository at this point in the history
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 5232e51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
machine:
node:
version: 6.2.2
version: 10.0.0
environment:
SOURCE_MAP_SUPPORT: false

Expand Down
2 changes: 1 addition & 1 deletion node-syscall/syscall.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5232e51

Please sign in to comment.