| OLD | NEW |
| (Empty) | |
| 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 |
| 5 function f(o) { |
| 6 return o.x; |
| 7 } |
| 8 this.x = 100; |
| 9 f(this); |
| 10 f(this); |
| 11 f(this); |
| 12 |
| 13 Object.defineProperty(this, 'x', { get: function() { return 10; }}); |
| 14 assertEquals(10, this.x); |
| 15 assertEquals(10, f(this)); |
| 16 |
| 17 function f2(o) { |
| 18 return o.y; |
| 19 } |
| 20 |
| 21 f2(this); |
| 22 f2(this); |
| 23 f2(this); |
| 24 |
| 25 Object.defineProperty(this, 'y', { get: function() { return 10; }}); |
| 26 assertEquals(10, this.y); |
| 27 assertEquals(10, f2(this)); |
| OLD | NEW |