Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/nodejs/src/node_shadow_realm.h
1 #ifndef SRC_NODE_SHADOW_REALM_H_ 2 #define SRC_NODE_SHADOW_REALM_H_ 3 4 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 5 6 #include "node_realm.h" 7 #include "v8.h" 8 9 namespace node { 10 namespace shadow_realm { 11 12 class ShadowRealm final : public Realm { 13 public: 14 static ShadowRealm* New(Environment* env); 15 16 SET_MEMORY_INFO_NAME(ShadowRealm) 17 SET_SELF_SIZE(ShadowRealm) 18 19 v8::Local<v8::Context> context() const override; 20 21 #define V(PropertyName, TypeName) \ 22 v8::Local<TypeName> PropertyName() const override; \ 23 void set_##PropertyName(v8::Local<TypeName> value) override; 24 PER_REALM_STRONG_PERSISTENT_VALUES(V) 25 #undef V 26 27 protected: 28 v8::MaybeLocal<v8::Value> BootstrapRealm() override; 29 30 private: 31 static void WeakCallback(const v8::WeakCallbackInfo<ShadowRealm>& data); 32 static void DeleteMe(void* data); 33 34 explicit ShadowRealm(Environment* env); 35 ~ShadowRealm(); 36 }; 37 38 v8::MaybeLocal<v8::Context> HostCreateShadowRealmContextCallback( 39 v8::Local<v8::Context> initiator_context); 40 41 } // namespace shadow_realm 42 } // namespace node 43 44 #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 45 46 #endif // SRC_NODE_SHADOW_REALM_H_