GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: allow embedder customization of OOMErrorHandler · nodejs/node@b17163b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • api
      • environment.cc
    • node.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/api/environment.cc‎

Copy file name to clipboardExpand all lines: src/api/environment.cc
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
233233
auto* fatal_error_cb = s.fatal_error_callback ?
234234
s.fatal_error_callback : OnFatalError;
235235
isolate->SetFatalErrorHandler(fatal_error_cb);
236-
isolate->SetOOMErrorHandler(OOMErrorHandler);
236+
237+
auto* oom_error_cb =
238+
s.oom_error_callback ? s.oom_error_callback : OOMErrorHandler;
239+
isolate->SetOOMErrorHandler(oom_error_cb);
237240

238241
if ((s.flags & SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK) == 0) {
239242
auto* prepare_stack_trace_cb = s.prepare_stack_trace_callback ?
Collapse file

‎src/node.h‎

Copy file name to clipboardExpand all lines: src/node.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ struct IsolateSettings {
483483
v8::Isolate::AbortOnUncaughtExceptionCallback
484484
should_abort_on_uncaught_exception_callback = nullptr;
485485
v8::FatalErrorCallback fatal_error_callback = nullptr;
486+
v8::OOMErrorCallback oom_error_callback = nullptr;
486487
v8::PrepareStackTraceCallback prepare_stack_trace_callback = nullptr;
487488

488489
// Miscellaneous callbacks

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.