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

Unified Diff: include/v8.h

Issue 201573007: Revert "Remove Failure::OutOfMemory propagation and V8::IgnoreOutOfMemoryException." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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.cc » ('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 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();
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698