★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/091902ae00Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
console: remove trace frame
The own function's frame was removed originally. This restors that
behavior.

Fixes: #27134

PR-URL: #27159
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
  • Loading branch information
BridgeAR authored and ZYSzys committed Apr 12, 2019
1 parent 908292c commit 091902ae0057894d66ca925d8c4f721f86e9b6cd
Showing with 2 additions and 3 deletions.
  1. +2 −2 lib/internal/console/constructor.js
  2. +0 −1 test/message/console.out
@@ -325,13 +325,13 @@ const consoleMethods = {
trace(kTraceInstant, kTraceConsoleCategory, `time::${label}`, 0);
},

trace(...args) {
trace: function trace(...args) {
const err = {
name: 'Trace',
message: this[kFormatForStderr](args)
};
// eslint-disable-next-line no-restricted-syntax
Error.captureStackTrace(err, this.trace);
Error.captureStackTrace(err, trace);
this.error(err.stack);
},

@@ -1,5 +1,4 @@
Trace: foo
at Object.trace (*)
at Object.<anonymous> (*console.js:*:*)
at *
at *

0 comments on commit 091902a

Please sign in to comment.