regress-495773.js (1159B)
1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 //----------------------------------------------------------------------------- 7 var BUGNUMBER = 495773; 8 var summary = 'Read upvar from trace-entry frame from JSStackFrame instead of tracing native stack'; 9 var actual = '' 10 var expect = '010101'; 11 //----------------------------------------------------------------------------- 12 function f() { 13 var q = []; 14 for (var a = 0; a < 3; ++a) { 15 (function () { 16 for (var b = 0; b < 2; ++b) { 17 (function () { 18 for (var c = 0; c < 1; ++c) { 19 q.push(b); 20 } 21 })(); 22 } 23 })(); 24 } 25 return q.join(""); 26 } 27 28 test(); 29 //----------------------------------------------------------------------------- 30 31 function test() 32 { 33 printBugNumber(BUGNUMBER); 34 printStatus (summary); 35 36 actual = f(); 37 38 reportCompare(expect, actual, summary); 39 }