Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Unified Diff: include/v8.h

Issue 2139873002: V8: Add API to report OOM to embedder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: compile fixes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698