Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index ef099948b9bdb2bb9c8064c048584d83ce89f77d..5e54267e34cd1dc9d962adb364e9f8540b4e1006 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -4616,6 +4616,20 @@ class V8_EXPORT V8 { |
static void SetArrayBufferAllocator(ArrayBuffer::Allocator* allocator); |
/** |
+ * Ignore out-of-memory exceptions. |
+ * |
+ * V8 running out of memory is treated as a fatal error by default. |
+ * This means that the fatal error handler is called and that V8 is |
+ * terminated. |
+ * |
+ * IgnoreOutOfMemoryException can be used to not treat an |
+ * out-of-memory situation as a fatal error. This way, the contexts |
+ * that did not cause the out of memory problem might be able to |
+ * continue execution. |
+ */ |
+ static void IgnoreOutOfMemoryException(); |
+ |
+ /** |
* Check if V8 is dead and therefore unusable. This is the case after |
* fatal errors such as out-of-memory situations. |
*/ |
@@ -5219,6 +5233,9 @@ class V8_EXPORT Context { |
*/ |
void Exit(); |
+ /** Returns true if the context has experienced an out of memory situation. */ |
+ bool HasOutOfMemoryException(); |
+ |
/** Returns an isolate associated with a current context. */ |
v8::Isolate* GetIsolate(); |