@@ -107,6 +107,11 @@ struct PackageConfig{
107107V (napi_env, " node:napi:env" ) \
108108V (napi_wrapper, " node:napi:wrapper" ) \
109109
110+ // Symbols are per-isolate primitives but Environment proxies them
111+ // for the sake of convenience.
112+ #define PER_ISOLATE_SYMBOL_PROPERTIES (V ) \
113+ V (handle_onclose_symbol, " handle_onclose" ) \
114+
110115// Strings are per-isolate primitives but Environment proxies them
111116// for the sake of convenience. Strings should be ASCII-only.
112117#define PER_ISOLATE_STRING_PROPERTIES (V ) \
@@ -127,7 +132,6 @@ struct PackageConfig{
127132V (chunks_sent_since_last_write_string, " chunksSentSinceLastWrite" ) \
128133V (constants_string, " constants" ) \
129134V (oncertcb_string, " oncertcb" ) \
130- V (onclose_string, " _onclose" ) \
131135V (code_string, " code" ) \
132136V (cwd_string, " cwd" ) \
133137V (dest_string, " dest" ) \
@@ -356,10 +360,12 @@ class IsolateData{
356360inline MultiIsolatePlatform* platform () const ;
357361
358362#define VP (PropertyName, StringValue ) V(v8::Private, PropertyName)
363+ #define VY (PropertyName, StringValue ) V(v8::Symbol, PropertyName)
359364#define VS (PropertyName, StringValue ) V(v8::String, PropertyName)
360365#define V (TypeName, PropertyName ) \
361366inline v8::Local<TypeName> PropertyName (v8::Isolate* isolate) const ;
362367PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES (VP)
368+ PER_ISOLATE_SYMBOL_PROPERTIES (VY)
363369PER_ISOLATE_STRING_PROPERTIES (VS)
364370#undef V
365371#undef VS
@@ -370,10 +376,12 @@ class IsolateData{
370376
371377private:
372378#define VP (PropertyName, StringValue ) V(v8::Private, PropertyName)
379+ #define VY (PropertyName, StringValue ) V(v8::Symbol, PropertyName)
373380#define VS (PropertyName, StringValue ) V(v8::String, PropertyName)
374381#define V (TypeName, PropertyName ) \
375382 v8::Eternal<TypeName> PropertyName ## _;
376383PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES (VP)
384+ PER_ISOLATE_SYMBOL_PROPERTIES (VY)
377385PER_ISOLATE_STRING_PROPERTIES (VS)
378386#undef V
379387#undef VS
@@ -737,13 +745,16 @@ class Environment{
737745// Strings and private symbols are shared across shared contexts
738746// The getters simply proxy to the per-isolate primitive.
739747#define VP (PropertyName, StringValue ) V(v8::Private, PropertyName)
748+ #define VY (PropertyName, StringValue ) V(v8::Symbol, PropertyName)
740749#define VS (PropertyName, StringValue ) V(v8::String, PropertyName)
741750#define V (TypeName, PropertyName ) \
742751inline v8::Local<TypeName> PropertyName () const ;
743752PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES (VP)
753+ PER_ISOLATE_SYMBOL_PROPERTIES (VY)
744754PER_ISOLATE_STRING_PROPERTIES (VS)
745755#undef V
746756#undef VS
757+ #undef VY
747758#undef VP
748759
749760#define V (PropertyName, TypeName ) \
0 commit comments