Deprecate Context::HasOutOfMemoryException.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Apr 2014 11:11:25 +0000 (11:11 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Apr 2014 11:11:25 +0000 (11:11 +0000)
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/225723004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

include/v8.h

index fb91be3..392a361 100644 (file)
@@ -5274,8 +5274,13 @@ class V8_EXPORT Context {
    */
   void Exit();
 
-  /** Returns true if the context has experienced an out of memory situation. */
-  bool HasOutOfMemoryException() { return false; }
+  /**
+   * Returns true if the context has experienced an out of memory situation.
+   * Since V8 always treats OOM as fatal error, this can no longer return true.
+   * Therefore this is now deprecated.
+   * */
+  V8_DEPRECATED("This can no longer happen. OOM is a fatal error.",
+                bool HasOutOfMemoryException()) { return false; }
 
   /** Returns an isolate associated with a current context. */
   v8::Isolate* GetIsolate();