Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index c3c7743dfdde5952ceef702e8e0d32d988480242..d5d39181b9db41d2b9fd410e1c974acce13b4ad7 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -5012,6 +5012,7 @@ class V8_EXPORT ResourceConstraints { |
typedef void (*FatalErrorCallback)(const char* location, const char* message); |
+typedef void (*OOMErrorCallback)(const char* location, bool is_heap_oom); |
typedef void (*MessageCallback)(Local<Message> message, Local<Value> error); |
@@ -6326,6 +6327,9 @@ class V8_EXPORT Isolate { |
/** Set the callback to invoke in case of fatal errors. */ |
void SetFatalErrorHandler(FatalErrorCallback that); |
+ /** Set the callback to invoke in case of OOM errors. */ |
+ void SetOOMErrorHandler(OOMErrorCallback that); |
+ |
/** |
* Set the callback to invoke to check if code generation from |
* strings should be allowed. |
@@ -8872,7 +8876,6 @@ void V8::SetFatalErrorHandler(FatalErrorCallback callback) { |
isolate->SetFatalErrorHandler(callback); |
} |
- |
void V8::RemoveGCPrologueCallback(GCCallback callback) { |
Isolate* isolate = Isolate::GetCurrent(); |
isolate->RemoveGCPrologueCallback( |