Revision: 6844
Author: [email protected]
Date: Thu Feb 17 09:21:59 2011
Log: Make OutOfMemory exception thrown from JS call into FatalProcessOutOfMemory as well.

That unifies the behaviour with CALL_HEAP_FUNCTION macro.

BUG=v8:1165

Review URL: http://codereview.chromium.org/6528050
http://code.google.com/p/v8/source/detail?r=6844

Modified:
 /branches/bleeding_edge/src/execution.cc

=======================================
--- /branches/bleeding_edge/src/execution.cc    Fri Feb 11 06:26:56 2011
+++ /branches/bleeding_edge/src/execution.cc    Thu Feb 17 09:21:59 2011
@@ -106,6 +106,11 @@
   ASSERT(*has_pending_exception == Top::has_pending_exception());
   if (*has_pending_exception) {
     Top::ReportPendingMessages();
+    if (Top::pending_exception() == Failure::OutOfMemoryException()) {
+      if (!HandleScopeImplementer::instance()->ignore_out_of_memory()) {
+        V8::FatalProcessOutOfMemory("JS", true);
+      }
+    }
     return Handle<Object>();
   } else {
     Top::clear_pending_message();

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to