I see 'env->context()' scattered throughout the node.js source code, where the variable 'env' is of a pointer to some Environment object (which I believe is defined in env.h). I cannot find the definition of this context() method associated with the Environment object anywhere in the source code. Can someone please point me in the right direction? I am looking for this simply out of curiosity.
It is generated via this macro: https://github.com/nodejs/node/blob/5fab50bdaf6d82abc8a15bc55685211431ef3b75/src/env.h#L331
The function declaration is here: https://github.com/nodejs/node/blob/5fab50bdaf6d82abc8a15bc55685211431ef3b75/src/env.h#L837
You'll find the implementation if you look for further uses of the ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES
macro.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.