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 <legendecas@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
  • Loading branch information
joyeecheung authored and marco-ippolito committed Jul 19, 2024
1 parent f773b28 commit 436ad8c
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 @@ -598,6 +598,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 436ad8c

Please sign in to comment.