Index: test/cctest/test-debug.cc |
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc |
index 941fa688d5af146926731d605cccc08dc2cb0a7d..8d97cd8d273c6ea368fbc27a5f41a407c6ea5727 100644 |
--- a/test/cctest/test-debug.cc |
+++ b/test/cctest/test-debug.cc |
@@ -7532,4 +7532,18 @@ 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 |