• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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());
14