Skip to content

Commit f9075ff

Browse files
joyeecheungtargos
authored andcommitted
src: print v8::OOMDetails::detail when it's available
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>
1 parent 4704270 commit f9075ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/node_errors.cc

+3
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,9 @@ void OOMErrorHandler(const char* location, const v8::OOMDetails& details) {
600600
} else {
601601
FPrintF(stderr, "FATAL ERROR: %s\n", message);
602602
}
603+
if (details.detail != nullptr) {
604+
FPrintF(stderr, "Reason: %s\n", details.detail);
605+
}
603606

604607
Isolate* isolate = Isolate::TryGetCurrent();
605608
bool report_on_fatalerror;

0 commit comments

Comments
 (0)