| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e5c68cd commit cc3e427
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -588,9 +588,9 @@ void Environment::PrintSyncTrace() const { | |||
| 588 | 588 | ||
| 589 | 589 | fprintf( | |
| 590 | 590 | stderr, "(node:%d) WARNING: Detected use of sync API\n", uv_os_getpid()); | |
| 591 | - PrintStackTrace( | ||
| 592 | - isolate(), | ||
| 593 | - StackTrace::CurrentStackTrace(isolate(), 10, StackTrace::kDetailed)); | ||
| 591 | + PrintStackTrace(isolate(), | ||
| 592 | + StackTrace::CurrentStackTrace( | ||
| 593 | + isolate(), stack_trace_limit(), StackTrace::kDetailed)); | ||
| 594 | 594 | } | |
| 595 | 595 | ||
| 596 | 596 | void Environment::RunCleanup() { | |
@@ -943,9 +943,9 @@ void Environment::Exit(int exit_code) { | |||
| 943 | 943 | ||
| 944 | 944 | fprintf( | |
| 945 | 945 | stderr, "WARNING: Exited the environment with code %d\n", exit_code); | |
| 946 | - PrintStackTrace( | ||
| 947 | - isolate(), | ||
| 948 | - StackTrace::CurrentStackTrace(isolate(), 10, StackTrace::kDetailed)); | ||
| 946 | + PrintStackTrace(isolate(), | ||
| 947 | + StackTrace::CurrentStackTrace( | ||
| 948 | + isolate(), stack_trace_limit(), StackTrace::kDetailed)); | ||
| 949 | 949 | } | |
| 950 | 950 | if (is_main_thread()) { | |
| 951 | 951 | stop_sub_worker_contexts(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1230,6 +1230,8 @@ class Environment : public MemoryRetainer { | |||
| 1230 | 1230 | ||
| 1231 | 1231 | inline AsyncRequest* thread_stopper() { return &thread_stopper_; } | |
| 1232 | 1232 | ||
| 1233 | + inline int32_t stack_trace_limit() const { return 10; } | ||
| 1234 | + | ||
| 1233 | 1235 | #if HAVE_INSPECTOR | |
| 1234 | 1236 | void set_coverage_connection( | |
| 1235 | 1237 | std::unique_ptr<profiler::V8CoverageConnection> connection); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -145,7 +145,7 @@ static std::string GetErrorSource(Isolate* isolate, | |||
| 145 | 145 | } | |
| 146 | 146 | ||
| 147 | 147 | void PrintStackTrace(Isolate* isolate, Local<StackTrace> stack) { | |
| 148 | - for (int i = 0; i < stack->GetFrameCount() - 1; i++) { | ||
| 148 | + for (int i = 0; i < stack->GetFrameCount(); i++) { | ||
| 149 | 149 | Local<StackFrame> stack_frame = stack->GetFrame(isolate, i); | |
| 150 | 150 | node::Utf8Value fn_name_s(isolate, stack_frame->GetFunctionName()); | |
| 151 | 151 | node::Utf8Value script_name(isolate, stack_frame->GetScriptName()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,3 +10,4 @@ Thrown at: | |||
| 10 | 10 | at Module.load (internal/modules/cjs/loader.js:*:*) | |
| 11 | 11 | at Module._load (internal/modules/cjs/loader.js:*:*) | |
| 12 | 12 | at executeUserEntryPoint (internal/modules/run_main.js:*:*) | |
| 13 | + at internal/main/run_main_module.js:*:* | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,3 +10,4 @@ Thrown at: | |||
| 10 | 10 | at Module.load (internal/modules/cjs/loader.js:*:*) | |
| 11 | 11 | at Module._load (internal/modules/cjs/loader.js:*:*) | |
| 12 | 12 | at executeUserEntryPoint (internal/modules/run_main.js:*:*) | |
| 13 | + at internal/main/run_main_module.js:*:* | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,3 +10,4 @@ Thrown at: | |||
| 10 | 10 | at Module.load (internal/modules/cjs/loader.js:*:*) | |
| 11 | 11 | at Module._load (internal/modules/cjs/loader.js:*:*) | |
| 12 | 12 | at executeUserEntryPoint (internal/modules/run_main.js:*:*) | |
| 13 | + at internal/main/run_main_module.js:*:* | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments