@@ -77,11 +77,12 @@ function GetName(object) { |
|
|
77 |
77 |
return desc && desc.value; |
78 |
78 |
} |
79 |
79 |
|
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); |
85 |
86 |
} |
86 |
87 |
|
87 |
88 |
function serializeError(error) { |
@@ -106,7 +107,7 @@ function serializeError(error) { |
|
|
106 |
107 |
return Buffer.concat([Buffer.from([kSerializedObject]), serialized]); |
107 |
108 |
} catch {} |
108 |
109 |
return Buffer.concat([Buffer.from([kInspectedError]), |
109 |
|
-Buffer.from(lazyUtil().inspect(error), 'utf8')]); |
|
110 |
+Buffer.from(inspect(error), 'utf8')]); |
110 |
111 |
} |
111 |
112 |
|
112 |
113 |
function deserializeError(error) { |