Skip to content

Commit

Permalink
errors: prevent stack recalculation
Browse files Browse the repository at this point in the history
Newer v8 versions exclude the constructor from the stack trace
so the recalculation of the trace can be avoided.

PR-URL: #13743
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
BridgeAR authored and addaleax committed Jul 11, 2017
1 parent 27a2adc commit cb75e50
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function makeNodeError(Base) {
constructor(key, ...args) {
super(message(key, args));
this[kCode] = key;
Error.captureStackTrace(this, NodeError);
}

get name() {
Expand Down

0 comments on commit cb75e50

Please sign in to comment.