OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 var o = { f: function() { throw new Error(); } }; |
| 6 o.g = function() { o.f() } |
| 7 |
| 8 Error.prepareStackTrace = function(e, frames) { return frames; } |
| 9 |
| 10 try { |
| 11 o.g(); |
| 12 } catch (e) { |
| 13 var frames = e.stack; |
| 14 assertEquals("f", frames[0].getMethodName()); |
| 15 assertEquals("g", frames[1].getMethodName()); |
| 16 assertEquals(null, frames[2].getMethodName()); |
| 17 } |
OLD | NEW |