Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | * Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | * http://creativecommons.org/licenses/publicdomain/ |
michael@0 | 4 | * Contributor: Jason Orendorff |
michael@0 | 5 | */ |
michael@0 | 6 | |
michael@0 | 7 | // This test appeared in bug 497789 comment 78. |
michael@0 | 8 | |
michael@0 | 9 | var a = {x: 'a'}, |
michael@0 | 10 | b1 = Object.create(a), |
michael@0 | 11 | c1 = Object.create(b1), |
michael@0 | 12 | b2 = Object.create(a), |
michael@0 | 13 | c2 = Object.create(b2); |
michael@0 | 14 | |
michael@0 | 15 | b2.x = 'b'; // foreshadowing a.x |
michael@0 | 16 | |
michael@0 | 17 | var s = ''; |
michael@0 | 18 | for each (var obj in [c1, c2]) |
michael@0 | 19 | s += obj.x; |
michael@0 | 20 | assertEq(s, 'ab'); |
michael@0 | 21 | |
michael@0 | 22 | reportCompare(0, 0, "Property cache soundness: objects with the same shape but different prototypes."); |