File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -77,11 +77,12 @@ function GetName(object) {
7777 return desc && desc . value ;
7878}
7979
80- let util ;
81- function lazyUtil ( ) {
82- if ( ! util )
83- util = require ( 'util' ) ;
84- return util ;
80+ let internalUtilInspect ;
81+ function inspect ( ...args ) {
82+ if ( ! internalUtilInspect ) {
83+ internalUtilInspect = require ( 'internal/util/inspect' ) ;
84+ }
85+ return internalUtilInspect . inspect ( ...args ) ;
8586}
8687
8788function serializeError ( error ) {
@@ -106,7 +107,7 @@ function serializeError(error) {
106107 return Buffer . concat ( [ Buffer . from ( [ kSerializedObject ] ) , serialized ] ) ;
107108 } catch { }
108109 return Buffer . concat ( [ Buffer . from ( [ kInspectedError ] ) ,
109- Buffer . from ( lazyUtil ( ) . inspect ( error ) , 'utf8' ) ] ) ;
110+ Buffer . from ( inspect ( error ) , 'utf8' ) ] ) ;
110111}
111112
112113function deserializeError ( error ) {
You can’t perform that action at this time.
0 commit comments