blob: ea3baba0bb927ecbd5bae85295eea1e490c66e14 [file] [log] [blame]
Ben Murdoch61f157c2016-09-16 13:49:30 +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
5// Flags: --allow-natives-syntax
6
7function Foo() {}
8Object.defineProperty(Foo.prototype, "name",
9 {get: function() { return "FooName"; }});
10
11function ic(f) {
12 return f.prototype.name;
13}
14
15assertEquals("FooName", ic(Foo));
16assertEquals("FooName", ic(Foo)); // Don't crash, don't time out.