Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
chakrashim,src: fix lint issues
Browse files Browse the repository at this point in the history
PR-URL: #514
Reviewed-By: Seth Brenith <sethb@microsoft.com>
  • Loading branch information
kfarnung committed Apr 17, 2018
1 parent 0a98060 commit 42fe0fe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
15 changes: 10 additions & 5 deletions deps/chakrashim/lib/chakra_shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,17 @@
if (!isPrepared) {
const prep = Error.prepareStackTrace || prepareStackTrace;

// Prep can be re-entrant, of sorts, with regards to setting err.stack vs returning what err.stack should be
// Prep can be re-entrant, of sorts, with regards to setting err.stack
// vs returning what err.stack should be.
// We are trying to emulate the following behavior:
// Error.prepareStackTrace = function (err, frames) { err.stack = 1 } -> err.stack should be 1
// Error.prepareStackTrace = function (err, frames) { console.log("Called prepare") } -> err.stack should be undefined
// Error.prepareStackTrace = function (err, frames) { return 2 } -> err.stack should be 2
// Error.prepareStackTrace = function (err, frames) { err.stack = 1; return 2; } -> err.stack should be *1*
// * Error.prepareStackTrace = function (err, frames)
// { err.stack = 1 } -> err.stack should be 1
// * Error.prepareStackTrace = function (err, frames)
// { console.log("Called prepare") } -> err.stack should be undefined
// * Error.prepareStackTrace = function (err, frames)
// { return 2 } -> err.stack should be 2
// * Error.prepareStackTrace = function (err, frames)
// { err.stack = 1; return 2; } -> err.stack should be *1*
const preparedStack = prep(err, ensureStackTrace());
if (!isPrepared) {
stackSetter(preparedStack);
Expand Down
21 changes: 11 additions & 10 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3532,16 +3532,17 @@ static void PrintHelp() {
" supports ${rotation} and ${pid}\n"
" log-rotation id. %%2$u is the pid.\n"
#if ENABLE_TTD_NODE
" --record enable diagnostics record mode\n"
" --tt-debug debug with interactive time-travel\n"
" --record-interval=num interval between snapshots in recording\n"
" (in milliseconds) defaults to 2 seconds\n"
" --record-history=num number of snapshots retained in log \n"
" during recording (deafults to 2)\n"
" --replay=dir replay execution from recording log\n"
" --replay-debug=dir replay and debug using recording log\n"
" --break-first break at first statement when running\n"
" in --replay-debug mode\n"
" --record enable diagnostics record mode\n"
" --tt-debug debug with interactive time-travel\n"
" --record-interval=num interval between snapshots in\n"
" recording (in milliseconds) (defaults\n"
" to 2000)\n"
" --record-history=num number of snapshots retained in log \n"
" during recording (defaults to 2)\n"
" --replay=dir replay execution from recording log\n"
" --replay-debug=dir replay and debug using recording log\n"
" --break-first break at first statement when running\n"
" in --replay-debug mode\n"
#endif
" --track-heap-objects track heap object allocations for heap "
"snapshots\n"
Expand Down

0 comments on commit 42fe0fe

Please sign in to comment.