Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlegendecas <legendecas@gmail.com>2021-06-10 18:55:54 +0300
committerJames M Snell <jasnell@gmail.com>2021-06-14 18:10:54 +0300
commit99a3d557848952ffaff855c25de5b9108d692479 (patch)
tree861a6be890ad93043b06b92d931a2c5f689d9bd3 /src/node_errors.cc
parent7a0a8efec183db31294369823cc5a66c3a54cc7b (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_errors.cc')
-rw-r--r--src/node_errors.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc
index 3aee2533a8c..a22493a140d 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -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);