1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// The teleporting optimization should work correctly // when we modify an object's proto. var A = {x: 1}; var B = Object.create(A); var C = {}; C.__proto__ = B; function f() { for (var i=0; i<25; i++) { assertEq(C.x, (i <= 20) ? 1 : 3); if (i === 20) { B.x = 3; } } } f();