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: nodejs#53360
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
  • Loading branch information
joyeecheung authored and bmeck committed Jun 22, 2024
1 parent 37cb863 commit ad0199f
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 ad0199f

Please sign in to comment.