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
5var o = {
6  get 0() { reference_error;  },
7  get length() { return 1; }
8};
9
10var method_name;
11
12try {
13  o[0];
14} catch (e) {
15  thrown = true;
16  Error.prepareStackTrace = function(exception, frames) { return frames; };
17  var frames = e.stack;
18  Error.prepareStackTrace = undefined;
19  method_name = frames[0].getMethodName();
20}
21
22assertEquals("0", method_name);
23