blob: fbf650ddbfd35f874ab447927cb64e0d9ca8bba3 [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// 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
5var o = { f: function() { throw new Error(); } };
6o.g1 = function() { o.f() }
7o.g2 = o.g1;
8o.h = function() { o.g1() }
9
10Error.prepareStackTrace = function(e, frames) { return frames; }
11
12try {
13 o.h();
14} catch (e) {
15 var frames = e.stack;
16 assertEquals("f", frames[0].getMethodName());
17 assertEquals(null, frames[1].getMethodName());
18 assertEquals("h", frames[2].getMethodName());
19 assertEquals(null, frames[3].getMethodName());
20}