File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 8
8
ERR_UNKNOWN_SIGNAL
9
9
} ,
10
10
uvErrmapGet,
11
- overrideStackTrace,
12
11
} = require ( 'internal/errors' ) ;
13
12
const { signals } = internalBinding ( 'constants' ) . os ;
14
13
const {
@@ -340,12 +339,12 @@ function isInsideNodeModules() {
340
339
// the perf implications should be okay.
341
340
getStructuredStack = runInNewContext ( `(function() {
342
341
Error.stackTraceLimit = Infinity;
342
+ Error.prepareStackTrace = (err, trace) => trace;
343
+
343
344
return function structuredStack() {
344
- const e = new Error();
345
- overrideStackTrace.set(e, (err, trace) => trace);
346
- return e.stack;
345
+ return new Error().stack;
347
346
};
348
- })()` , { overrideStackTrace } , { filename : 'structured-stack' } ) ;
347
+ })()` , { } , { filename : 'structured-stack' } ) ;
349
348
}
350
349
351
350
const stack = getStructuredStack ( ) ;
You can’t perform that action at this time.
0 commit comments