diff options
author | Harshitha KP <harshi46@in.ibm.com> | 2020-03-16 09:13:10 +0300 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2020-03-25 22:43:45 +0300 |
commit | 2fa74e3e38bb028339e48763138456b3ed10ed97 (patch) | |
tree | 5290bc573103d0e6088c5ddcd5625d919f6ceb82 /src/node_errors.cc | |
parent | 388cef61e8a4859b7505f7b5cf988eba27ce17b4 (diff) |
report: handle on-fatalerror better
--report-on-fatalerror was not honored properly, as there was no
way to check the value which was stored in the Environment pointer
which can be inaccessible under certain fatal error situations.
Move the flag out of Environment pointer so that this is doable.
Co-authored-by: Shobhit Chittora schittora@paypal.com
PR-URL: https://github.com/nodejs/node/pull/32207
Fixes: https://github.com/nodejs/node/issues/31576
Refs: https://github.com/nodejs/node/pull/29881
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
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 ae1da87ef6b..590562cccff 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -406,7 +406,7 @@ void OnFatalError(const char* location, const char* message) { Isolate* isolate = Isolate::GetCurrent(); Environment* env = Environment::GetCurrent(isolate); - if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) { + if (per_process::cli_options->report_on_fatalerror) { report::TriggerNodeReport( isolate, env, message, "FatalError", "", Local<String>()); } |