From 42fe0fe928d0b82d14ef6696e3a9b234b3e89982 Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Tue, 17 Apr 2018 13:53:11 -0700 Subject: [PATCH] chakrashim,src: fix lint issues PR-URL: https://github.com/nodejs/node-chakracore/pull/514 Reviewed-By: Seth Brenith --- deps/chakrashim/lib/chakra_shim.js | 15 ++++++++++----- src/node.cc | 21 +++++++++++---------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/deps/chakrashim/lib/chakra_shim.js b/deps/chakrashim/lib/chakra_shim.js index a7da640d9f2..dc4b35e6c43 100644 --- a/deps/chakrashim/lib/chakra_shim.js +++ b/deps/chakrashim/lib/chakra_shim.js @@ -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); diff --git a/src/node.cc b/src/node.cc index 8c76d1de552..ec2e32492ae 100644 --- a/src/node.cc +++ b/src/node.cc @@ -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"