Index: test/mjsunit/stack-traces.js |
diff --git a/test/mjsunit/stack-traces.js b/test/mjsunit/stack-traces.js |
index b9574a14b6a36c8296fd5f19d14935313a2d5c8f..a30a51548dfc40dbf8207501904f1eb6ef2daef5 100644 |
--- a/test/mjsunit/stack-traces.js |
+++ b/test/mjsunit/stack-traces.js |
@@ -380,3 +380,9 @@ assertEquals(undefined, error.stack); |
// Check that repeated trace collection does not crash. |
error = new Error(); |
Error.captureStackTrace(error); |
+ |
+// Check that exceptions thrown within prepareStackTrace throws an exception. |
+Error.prepareStackTrace = function(e, frames) { throw 42; } |
+ |
+var x = {} |
+assertThrows(() => Error.captureStackTrace(x)); |