blob: 6116427e7329d5ae0f3c515565cdd385f2c587e3 [file] [log] [blame]
Ben Murdochda12d292016-06-02 14:46:10 +01001// Copyright 2016 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
5Error.prepareStackTrace = function(e, frames) { return frames; }
6assertThrows(() => new Error().stack[0].getMethodName.call({}), TypeError);
7
8Error.prepareStackTrace = function(e, frames) { return frames.map(frame => new Proxy(frame, {})); }
9assertThrows(() => new Error().stack[0].getMethodName(), TypeError);
10
11Error.prepareStackTrace = function(e, frames) { return frames; }
12assertEquals(null, new Error().stack[0].getMethodName());