Compilation warning on newer node versions: v8 has a new ArrayBuffer BackingStore API
See original GitHub issueI get this output by node-gyp rebuild
(invoked using scripts/build.sh
) on Node version v14.10.1
:
../src/rcl_bindings.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE rclnodejs::CreateArrayBufferFromAddress(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/rcl_bindings.cpp:1330:70: warning: ‘static v8::Local<v8::ArrayBuffer> v8::ArrayBuffer::New(v8::Isolate*, void*, size_t, v8::ArrayBufferCreationMode)’ is deprecated: Use the version that takes a BackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
1330 | v8::ArrayBufferCreationMode::kInternalized);
| ^
In file included from /home/felix/.cache/node-gyp/14.10.1/include/node/node.h:67,
from ../node_modules/nan/nan.h:56,
from ../src/rcl_bindings.hpp:18,
from ../src/rcl_bindings.cpp:15:
/home/felix/.cache/node-gyp/14.10.1/include/node/v8.h:5169:29: note: declared here
5169 | static Local<ArrayBuffer> New(
| ^~~
../src/rcl_bindings.cpp:1330:70: warning: ‘static v8::Local<v8::ArrayBuffer> v8::ArrayBuffer::New(v8::Isolate*, void*, size_t, v8::ArrayBufferCreationMode)’ is deprecated: Use the version that takes a BackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
1330 | v8::ArrayBufferCreationMode::kInternalized);
| ^
In file included from /home/felix/.cache/node-gyp/14.10.1/include/node/node.h:67,
from ../node_modules/nan/nan.h:56,
from ../src/rcl_bindings.hpp:18,
from ../src/rcl_bindings.cpp:15:
/home/felix/.cache/node-gyp/14.10.1/include/node/v8.h:5169:29: note: declared here
5169 | static Local<ArrayBuffer> New(
| ^~~```
I didn’t include it in #734 as I don’t really know any v8 internals.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
v8::ArrayBuffer::New() without a BackingStore is deprecated in ...
The new API is present in V8 7.9, so we can already migrate to it: ... Create a new ArrayBuffer with an existing...
Read more >9908 - Feedback for the new ArrayBuffer BackingStore API - v8
i'm currently migrating nodejs to use the new API and have found a bug in backing-store.cc . This error didn't occur with the...
Read more >Deprecated APIs | Node.js v19.3.0 Documentation
Deprecated APIs#. Node.js APIs might be deprecated for any of the following reasons: Use of the API is unsafe. An improved alternative API...
Read more >was compiled against a different Node.js version using ...
Here is what worked for me: Require all dependencies you need in the main.js file that is run by electron. (this seemed to...
Read more >Node.js v15.0.0 is here!
While we backport new N-API versions to the other LTS Node.js versions ... updated to V8 8.6 (V8 8.4 is the latest available...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Never mind, none of us works on the project full-time, so welcome 🚀
Hey @minggangw, sorry for not writing about this, but I retreated to other projects.