Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0e89d7a

Browse filesBrowse files
cjihrigrvagg
authored andcommitted
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>
1 parent dff0149 commit 0e89d7a
Copy full SHA for 0e89d7a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-8
lines changed
Open diff view settings
Collapse file

‎src/node_errors.cc‎

Copy file name to clipboardExpand all lines: src/node_errors.cc
+2-8Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,9 @@ void OnFatalError(const char* location, const char* message) {
316316
Isolate* isolate = Isolate::GetCurrent();
317317
HandleScope handle_scope(isolate);
318318
Environment* env = Environment::GetCurrent(isolate);
319-
if (env != nullptr) {
320-
std::shared_ptr<PerIsolateOptions> options = env->isolate_data()->options();
321-
if (options->report_on_fatalerror) {
322-
report::TriggerNodeReport(
323-
isolate, env, message, __func__, "", Local<String>());
324-
}
325-
} else {
319+
if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) {
326320
report::TriggerNodeReport(
327-
isolate, nullptr, message, __func__, "", Local<String>());
321+
isolate, env, message, __func__, "", Local<String>());
328322
}
329323
#endif // NODE_REPORT
330324
fflush(stderr);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.