Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c9602ce

Browse filesBrowse files
committed
src: use new v8::OOMErrorCallback API
PR-URL: #44741 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 19a70c1 commit c9602ce
Copy full SHA for c9602ce

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎src/node_errors.cc‎

Copy file name to clipboardExpand all lines: src/node_errors.cc
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,10 @@ void OnFatalError(const char* location, const char* message) {
495495
ABORT();
496496
}
497497

498-
void OOMErrorHandler(const char* location, bool is_heap_oom) {
498+
void OOMErrorHandler(const char* location, const v8::OOMDetails& details) {
499499
const char* message =
500-
is_heap_oom ? "Allocation failed - JavaScript heap out of memory"
501-
: "Allocation failed - process out of memory";
500+
details.is_heap_oom ? "Allocation failed - JavaScript heap out of memory"
501+
: "Allocation failed - process out of memory";
502502
if (location) {
503503
FPrintF(stderr, "FATAL ERROR: %s %s\n", location, message);
504504
} else {
Collapse file

‎src/node_errors.h‎

Copy file name to clipboardExpand all lines: src/node_errors.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void AppendExceptionLine(Environment* env,
2121

2222
[[noreturn]] void FatalError(const char* location, const char* message);
2323
void OnFatalError(const char* location, const char* message);
24-
void OOMErrorHandler(const char* location, bool is_heap_oom);
24+
void OOMErrorHandler(const char* location, const v8::OOMDetails& details);
2525

2626
// Helpers to construct errors similar to the ones provided by
2727
// lib/internal/errors.js.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.