I'm searching on the node heap snapshot. And I found security_token in system and native_context in global in the snapshot.
They have a small shallow size and a very large retained size.
So I want to know the details of these.
Anyone who knows this?
Small intro, Node.js is written in C++ and JS engine V8 is written in the C++ too, so when people say native something
in Node.js they usually mean C++ stuff that can be called from the JS code or not and etc.
In that particular case native_context
is just the object that stores some fields from the Native side of the Node.js. Even datatypes are C++ entities under the hood and you are operating with these "native" entities.
There is no way you can change or modify the native_context
because this thing is defined during the build of the Node.js executable and defined in the C++ code. You can dig up more about these in the Node.js repository in C++ source code if you want to know more about that.
https://github.com/nodejs/node
UPD: You can search it in the code e.g. here is what you can find, but you need to know some C++ to understand.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With