diff options
author | legendecas <legendecas@gmail.com> | 2019-12-01 19:13:33 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-12-26 00:29:57 +0300 |
commit | 8baee5e31102f7e3d8b30245f060e37dbd221f41 (patch) | |
tree | 1408810d3366e4503cef47a10c3d029517b30ca6 /src/node_errors.cc | |
parent | 359f590b8da55e54b78f65857df6bb1bcef2d352 (diff) |
src: prevent hard coding stack trace limit
Refer to Environment::stack_trace_limit() while printing fresh
stacktraces in c++ land.
PR-URL: https://github.com/nodejs/node/pull/30752
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/node_errors.cc')
-rw-r--r-- | src/node_errors.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc index 9474fbb1131..7e23fca28df 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -145,7 +145,7 @@ static std::string GetErrorSource(Isolate* isolate, } void PrintStackTrace(Isolate* isolate, Local<StackTrace> stack) { - for (int i = 0; i < stack->GetFrameCount() - 1; i++) { + for (int i = 0; i < stack->GetFrameCount(); i++) { Local<StackFrame> stack_frame = stack->GetFrame(isolate, i); node::Utf8Value fn_name_s(isolate, stack_frame->GetFunctionName()); node::Utf8Value script_name(isolate, stack_frame->GetScriptName()); |