src: print v8::OOMDetails::detail when it's available

This provides a bit more information when V8 runs out of memory.

PR-URL: https://github.com/nodejs/node/pull/53360
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
This commit is contained in:
Joyee Cheung authored and Michaël Zasso committed 2024-06-20 14:40:42 +02:00
1 parent 4704270443
commit f9075ff38e
1 file changed
+3
+3
View File
@@ -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;