File tree Expand file tree Collapse file tree 6 files changed +12
-6
lines changed Expand file tree Collapse file tree 6 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const {
2525 ObjectKeys,
2626 ObjectSetPrototypeOf,
2727 Symbol,
28+ SymbolFor,
2829} = primordials ;
2930
3031const net = require ( 'net' ) ;
@@ -378,7 +379,7 @@ Server.prototype[EE.captureRejectionSymbol] = function(
378379 }
379380 break ;
380381 default :
381- net . Server . prototype [ Symbol . for ( 'nodejs.rejection' ) ]
382+ net . Server . prototype [ SymbolFor ( 'nodejs.rejection' ) ]
382383 . call ( this , err , event , ...args ) ;
383384 }
384385} ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const {
2626 ObjectDefineProperty,
2727 ObjectSetPrototypeOf,
2828 Symbol,
29+ SymbolFor,
2930} = primordials ;
3031
3132const {
@@ -1294,7 +1295,7 @@ Server.prototype[EE.captureRejectionSymbol] = function(
12941295 sock . destroy ( err ) ;
12951296 break ;
12961297 default :
1297- net . Server . prototype [ Symbol . for ( 'nodejs.rejection' ) ]
1298+ net . Server . prototype [ SymbolFor ( 'nodejs.rejection' ) ]
12981299 . call ( this , err , event , sock ) ;
12991300 }
13001301} ;
Original file line number Diff line number Diff line change @@ -33,8 +33,9 @@ const {
3333 ReflectApply,
3434 ReflectOwnKeys,
3535 Symbol,
36+ SymbolFor,
3637} = primordials ;
37- const kRejection = Symbol . for ( 'nodejs.rejection' ) ;
38+ const kRejection = SymbolFor ( 'nodejs.rejection' ) ;
3839
3940let spliceOne ;
4041
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const {
1717 ObjectDefineProperty,
1818 ObjectKeys,
1919 Symbol,
20+ SymbolFor,
2021} = primordials ;
2122
2223const messages = new Map ( ) ;
@@ -199,7 +200,7 @@ class SystemError extends Error {
199200 return `${ this . name } [${ this . code } ]: ${ this . message } ` ;
200201 }
201202
202- [ Symbol . for ( 'nodejs.util.inspect.custom' ) ] ( recurseTimes , ctx ) {
203+ [ SymbolFor ( 'nodejs.util.inspect.custom' ) ] ( recurseTimes , ctx ) {
203204 return lazyInternalUtilInspect ( ) . inspect ( this , {
204205 ...ctx ,
205206 getters : true ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const {
1212 ObjectSetPrototypeOf,
1313 ReflectConstruct,
1414 Symbol,
15+ SymbolFor,
1516} = primordials ;
1617
1718const {
@@ -425,7 +426,7 @@ module.exports = {
425426
426427 // Symbol used to provide a custom inspect function for an object as an
427428 // alternative to using 'inspect'
428- customInspectSymbol : Symbol . for ( 'nodejs.util.inspect.custom' ) ,
429+ customInspectSymbol : SymbolFor ( 'nodejs.util.inspect.custom' ) ,
429430
430431 // Used by the buffer module to capture an internal reference to the
431432 // default isEncoding implementation, just in case userland overrides it.
Original file line number Diff line number Diff line change 88 ObjectCreate,
99 ObjectEntries,
1010 Symbol,
11+ SymbolFor,
1112} = primordials ;
1213
1314const EventEmitter = require ( 'events' ) ;
@@ -62,7 +63,7 @@ const kOnCouldNotSerializeErr = Symbol('kOnCouldNotSerializeErr');
6263const kOnErrorMessage = Symbol ( 'kOnErrorMessage' ) ;
6364const kParentSideStdio = Symbol ( 'kParentSideStdio' ) ;
6465
65- const SHARE_ENV = Symbol . for ( 'nodejs.worker_threads.SHARE_ENV' ) ;
66+ const SHARE_ENV = SymbolFor ( 'nodejs.worker_threads.SHARE_ENV' ) ;
6667const debug = require ( 'internal/util/debuglog' ) . debuglog ( 'worker' ) ;
6768
6869let cwdCounter ;
You can’t perform that action at this time.
0 commit comments