| Index: test/mjsunit/stack-traces.js
|
| diff --git a/test/mjsunit/stack-traces.js b/test/mjsunit/stack-traces.js
|
| index 76b73b7233f39790cd610e5abcdd9a0cea25c088..ed16100de0ae0f921e26aaa7c5c5d7bf280f6b23 100644
|
| --- a/test/mjsunit/stack-traces.js
|
| +++ b/test/mjsunit/stack-traces.js
|
| @@ -213,27 +213,11 @@ function testErrorsDuringFormatting() {
|
| Nasty.prototype.foo = function () { throw new RangeError(); };
|
| var n = new Nasty();
|
| n.__defineGetter__('constructor', function () { CONS_FAIL; });
|
| - var threw = false;
|
| - try {
|
| - n.foo();
|
| - } catch (e) {
|
| - threw = true;
|
| - assertTrue(e.stack.indexOf('<error: ReferenceError') != -1,
|
| - "ErrorsDuringFormatting didn't contain error: ReferenceError");
|
| - }
|
| - assertTrue(threw, "ErrorsDuringFormatting didn't throw");
|
| - threw = false;
|
| + assertThrows(()=>n.foo(), RangeError);
|
| // Now we can't even format the message saying that we couldn't format
|
| // the stack frame. Put that in your pipe and smoke it!
|
| ReferenceError.prototype.toString = function () { NESTED_FAIL; };
|
| - try {
|
| - n.foo();
|
| - } catch (e) {
|
| - threw = true;
|
| - assertTrue(e.stack.indexOf('<error>') != -1,
|
| - "ErrorsDuringFormatting didn't contain <error>");
|
| - }
|
| - assertTrue(threw, "ErrorsDuringFormatting didnt' throw (2)");
|
| + assertThrows(()=>n.foo(), RangeError);
|
| }
|
|
|
|
|
|
|