diff options
author | legendecas <legendecas@gmail.com> | 2021-06-10 18:55:54 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2021-06-14 18:10:54 +0300 |
commit | 99a3d557848952ffaff855c25de5b9108d692479 (patch) | |
tree | 861a6be890ad93043b06b92d931a2c5f689d9bd3 /src/node_report.cc | |
parent | 7a0a8efec183db31294369823cc5a66c3a54cc7b (diff) |
report: generates report on threads with no isolates
PR-URL: https://github.com/nodejs/node/pull/38994
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_report.cc')
-rw-r--r-- | src/node_report.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/node_report.cc b/src/node_report.cc index 0144d22c17d..f1d8d191ab0 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -272,20 +272,22 @@ static void WriteNodeReport(Isolate* isolate, PrintVersionInformation(&writer); writer.json_objectend(); - writer.json_objectstart("javascriptStack"); - // Report summary JavaScript error stack backtrace - PrintJavaScriptErrorStack(&writer, isolate, error, trigger); + if (isolate != nullptr) { + writer.json_objectstart("javascriptStack"); + // Report summary JavaScript error stack backtrace + PrintJavaScriptErrorStack(&writer, isolate, error, trigger); - // Report summary JavaScript error properties backtrace - PrintJavaScriptErrorProperties(&writer, isolate, error); - writer.json_objectend(); // the end of 'javascriptStack' + // Report summary JavaScript error properties backtrace + PrintJavaScriptErrorProperties(&writer, isolate, error); + writer.json_objectend(); // the end of 'javascriptStack' + + // Report V8 Heap and Garbage Collector information + PrintGCStatistics(&writer, isolate); + } // Report native stack backtrace PrintNativeStack(&writer); - // Report V8 Heap and Garbage Collector information - PrintGCStatistics(&writer, isolate); - // Report OS and current thread resource usage PrintResourceUsage(&writer); |