Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // 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 var v = {}; | |
| 6 (function() { | |
| 7 var obj1 = { [v]: 42 }; | |
| 8 var obj2 = { | |
| 9 testCounts() { | |
| 10 super[v]++; | |
| 11 return this[v]; | |
| 12 } | |
| 13 } | |
| 14 Object.setPrototypeOf(obj2, obj1); | |
| 15 obj2.testCounts(); | |
| 16 | |
| 17 assertEquals(43, obj2.testCounts()); | |
| 18 assertEquals(42, obj1[v]); | |
| 19 }()); | |
| OLD | NEW |