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>
This commit is contained in:
legendecas authored and Danielle Adams committed 2021-06-14 19:31:04 -07:00
1 parent 4174f139b6
commit 4c6193fea1
4 files changed
+89 -49

No files matched your search

+3 -6
View File
@@ -425,13 +425,10 @@ void OnFatalError(const char* location, const char* message) {
}
Isolate* isolate = Isolate::GetCurrent();
// TODO(legendecas): investigate failures on triggering node-report with
// nullptr isolates.
if (isolate == nullptr) {
fflush(stderr);
ABORT();
Environment* env = nullptr;
if (isolate != nullptr) {
env = Environment::GetCurrent(isolate);
}
Environment* env = Environment::GetCurrent(isolate);
bool report_on_fatalerror;
{
Mutex::ScopedLock lock(node::per_process::cli_options_mutex);