diff --git a/src/node_errors.cc b/src/node_errors.cc index 45419f2c61fd79..c400d74d23bbbd 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -495,10 +495,10 @@ void OnFatalError(const char* location, const char* message) { ABORT(); } -void OOMErrorHandler(const char* location, bool is_heap_oom) { +void OOMErrorHandler(const char* location, const v8::OOMDetails& details) { const char* message = - is_heap_oom ? "Allocation failed - JavaScript heap out of memory" - : "Allocation failed - process out of memory"; + details.is_heap_oom ? "Allocation failed - JavaScript heap out of memory" + : "Allocation failed - process out of memory"; if (location) { FPrintF(stderr, "FATAL ERROR: %s %s\n", location, message); } else { diff --git a/src/node_errors.h b/src/node_errors.h index 5cc385c743e0b3..68a95835812e50 100644 --- a/src/node_errors.h +++ b/src/node_errors.h @@ -21,7 +21,7 @@ void AppendExceptionLine(Environment* env, [[noreturn]] void FatalError(const char* location, const char* message); void OnFatalError(const char* location, const char* message); -void OOMErrorHandler(const char* location, bool is_heap_oom); +void OOMErrorHandler(const char* location, const v8::OOMDetails& details); // Helpers to construct errors similar to the ones provided by // lib/internal/errors.js.