Skip to content

Commit

Permalink
report: simplify OnFatalError() handling
Browse files Browse the repository at this point in the history
PR-URL: #26191
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
cjihrig committed Feb 20, 2019
1 parent 3d62d0c commit 11a8a94
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/node_errors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,9 @@ void OnFatalError(const char* location, const char* message) {
Isolate* isolate = Isolate::GetCurrent();
HandleScope handle_scope(isolate);
Environment* env = Environment::GetCurrent(isolate);
if (env != nullptr) {
std::shared_ptr<PerIsolateOptions> options = env->isolate_data()->options();
if (options->report_on_fatalerror) {
report::TriggerNodeReport(
isolate, env, message, __func__, "", Local<String>());
}
} else {
if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) {
report::TriggerNodeReport(
isolate, nullptr, message, __func__, "", Local<String>());
isolate, env, message, __func__, "", Local<String>());
}
#endif // NODE_REPORT
fflush(stderr);
Expand Down

0 comments on commit 11a8a94

Please sign in to comment.