From 07e1d54aca548e1af0a3df4cf5eec4eaffc1d78f Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 5 Jun 2024 12:57:37 +0200 Subject: [PATCH] src: print v8::OOMDetails::detail when it's available This provides a bit more information when V8 runs out of memory. --- src/node_errors.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node_errors.cc b/src/node_errors.cc index b055c1e70dbf60..65f95c3157add2 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -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;