regress-365527.js (1204B)
1 // |reftest| slow 2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 //----------------------------------------------------------------------------- 8 var BUGNUMBER = 365527; 9 var summary = 'JSOP_ARGUMENTS should set obj register'; 10 var actual = 'No Crash'; 11 var expect = 'No Crash'; 12 13 //----------------------------------------------------------------------------- 14 test(); 15 //----------------------------------------------------------------------------- 16 17 function test() 18 { 19 printBugNumber(BUGNUMBER); 20 printStatus (summary); 21 22 23 counter = 500*1000; 24 25 var obj; 26 27 function getter() 28 { 29 obj = { get x() { 30 return getter(); 31 }, counter: counter}; 32 return obj; 33 } 34 35 36 var x; 37 38 function g() 39 { 40 x += this.counter; 41 if (--counter == 0) 42 throw "Done"; 43 } 44 45 46 function f() 47 { 48 arguments=g; 49 try { 50 for (;;) { 51 arguments(); 52 obj.x; 53 } 54 } catch (e) { 55 } 56 } 57 58 59 getter(); 60 f(); 61 62 reportCompare(expect, actual, summary); 63 }