Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 309040c7cd1160edddd1404b9aa64e6ffe4550f3..7e75897d13fa3d8cfa56b79754145cef84f807c0 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -22402,3 +22402,16 @@ TEST(Regress354123) { |
CompileRun("Object.getPrototypeOf(friend);"); |
CHECK_EQ(2, named_access_count); |
} |
+ |
+ |
+TEST(CaptureStackTraceForUncaughtExceptions) { |
+ v8::internal::FLAG_stack_size = 150; |
+ LocalContext current; |
+ v8::Isolate* isolate = current->GetIsolate(); |
+ v8::HandleScope scope(isolate); |
+ V8::SetCaptureStackTraceForUncaughtExceptions( |
+ true, 10, v8::StackTrace::kDetailed); |
+ v8::TryCatch try_catch; |
+ CompileRun("(function f(x) { f(x+1); })(0)"); |
+ CHECK(try_catch.HasCaught()); |
+} |