Skip to content

Commit

Permalink
src: print v8::OOMDetails::detail when it's available
Browse files Browse the repository at this point in the history
This provides a bit more information when V8 runs out of memory.

PR-URL: #53360
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
  • Loading branch information
joyeecheung authored and targos committed Jun 20, 2024
1 parent 4704270 commit f9075ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/node_errors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ void OOMErrorHandler(const char* location, const v8::OOMDetails& details) {
} else {
FPrintF(stderr, "FATAL ERROR: %s\n", message);
}
if (details.detail != nullptr) {
FPrintF(stderr, "Reason: %s\n", details.detail);
}

Isolate* isolate = Isolate::TryGetCurrent();
bool report_on_fatalerror;
Expand Down

0 comments on commit f9075ff

Please sign in to comment.