()
| 214 | |
| 215 | // Test that the explicit constructor call is shown in the trace |
| 216 | function testUnintendedCallerCensorship() { |
| 217 | var threw = false; |
| 218 | try { |
| 219 | new ReferenceError({ |
| 220 | toString: function () { |
| 221 | FAIL; |
| 222 | } |
| 223 | }); |
| 224 | } catch (e) { |
| 225 | assertTrue(e.stack.indexOf('at new ReferenceError') != -1, |
| 226 | "UnintendedCallerCensorship didn't contain new ReferenceError"); |
| 227 | threw = true; |
| 228 | } |
| 229 | assertTrue(threw, "UnintendedCallerCensorship didn't throw"); |
| 230 | } |
| 231 | |
| 232 | // If an error occurs while the stack trace is being formatted it should |
| 233 | // be handled gracefully. |
no test coverage detected