blob: 68e5b1682b58e17cebe7a869d27a27e6edf0f2f4 [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
5Realm.create();
6var object = Realm.eval(1, "Object");
7var f = Realm.eval(1, "function f() { return this }; f");
8
9Number.prototype.f = f;
10var number = 1;
11assertEquals(object.prototype, f.call(number).__proto__.__proto__);
12assertEquals(object.prototype, number.f().__proto__.__proto__);
13assertEquals(Realm.global(1), f());