Reviewers: Michael Starzinger,

Description:
Remove bogus test and add check for OOM in TryCall.


[email protected]
BUG=


Please review this at https://chromiumcodereview.appspot.com/11412318/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/execution.cc
  M test/cctest/test-debug.cc


Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index 8942fb31284ba39cbed3df07b23b904bfe897d44..d8a5cba9ad66c04012b49c9b9777483b67c42435 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -211,6 +211,9 @@ Handle<Object> Execution::TryCall(Handle<JSFunction> func,
     Isolate* isolate = Isolate::Current();
     ASSERT(isolate->has_pending_exception());
     ASSERT(isolate->external_caught_exception());
+    if (isolate->is_out_of_memory() && !isolate->ignore_out_of_memory()) {
+      V8::FatalProcessOutOfMemory(NULL);
+    }
     if (isolate->pending_exception() ==
         isolate->heap()->termination_exception()) {
       result = isolate->factory()->termination_exception();
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index 8d97cd8d273c6ea368fbc27a5f41a407c6ea5727..941fa688d5af146926731d605cccc08dc2cb0a7d 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -7532,18 +7532,4 @@ TEST(LiveEditDisabled) {
 }


-TEST(DebugContextOOM) {
-  v8::HandleScope scope;
-  LocalContext context;
-  v8::V8::IgnoreOutOfMemoryException();
-
- v8::Local<v8::Value> result = CompileRun("a = '1'; while (true) a += a;");
-
-  // Check for out of memory state.
-  CHECK(result.IsEmpty());
-  CHECK(context->HasOutOfMemoryException());
-
-  v8::Debug::GetDebugContext();
-}
-
 #endif  // ENABLE_DEBUGGER_SUPPORT


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

Reply via email to