Index: test/mjsunit/stack-traces-custom.js |
diff --git a/test/mjsunit/stack-traces-custom.js b/test/mjsunit/stack-traces-custom.js |
index fbf650ddbfd35f874ab447927cb64e0d9ca8bba3..75fad636e0d601fe0dca273e86579b01322760ef 100644 |
--- a/test/mjsunit/stack-traces-custom.js |
+++ b/test/mjsunit/stack-traces-custom.js |
@@ -2,19 +2,25 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-var o = { f: function() { throw new Error(); } }; |
+var o = { |
+ f: function() { throw new Error(); }, |
+ get j() { o.h(); }, |
+ set k(_) { o.j; }, |
+}; |
o.g1 = function() { o.f() } |
o.g2 = o.g1; |
o.h = function() { o.g1() } |
-Error.prepareStackTrace = function(e, frames) { return frames; } |
- |
try { |
- o.h(); |
+ o.k = 42; |
} catch (e) { |
+ Error.prepareStackTrace = function(e, frames) { return frames; }; |
var frames = e.stack; |
+ Error.prepareStackTrace = undefined; |
assertEquals("f", frames[0].getMethodName()); |
assertEquals(null, frames[1].getMethodName()); |
assertEquals("h", frames[2].getMethodName()); |
- assertEquals(null, frames[3].getMethodName()); |
+ assertEquals("j", frames[3].getMethodName()); |
+ assertEquals("k", frames[4].getMethodName()); |
+ assertEquals(null, frames[5].getMethodName()); |
} |