Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
report: simplify OnFatalError() handling
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
commit 11a8a940d7bf03dc108082bdd456668210b949c1
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