1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/saved-stacks/shared-parent-frames.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,19 @@ 1.4 +// Test that parent frames are shared when the older portions of two stacks are 1.5 +// the same. 1.6 + 1.7 +let f1, f2; 1.8 + 1.9 +function dos() { 1.10 + f1 = saveStack(); 1.11 + f2 = saveStack(); 1.12 +} 1.13 + 1.14 +(function uno() { 1.15 + dos(); 1.16 +}()); 1.17 + 1.18 + 1.19 +// Different youngest frames. 1.20 +assertEq(f1 == f2, false); 1.21 +// However the parents should be the same. 1.22 +assertEq(f1.parent, f2.parent);