regress-341821.js (1576B)
1 // |reftest| skip -- bug xxx - fails to dismiss alert 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 = 341821; 9 var summary = 'Close hook crash'; 10 var actual = 'No Crash'; 11 var expect = 'No Crash'; 12 13 var ialert = 0; 14 15 //----------------------------------------------------------------------------- 16 //test(); 17 //----------------------------------------------------------------------------- 18 19 function test() 20 { 21 printBugNumber(BUGNUMBER); 22 printStatus (summary); 23 24 function* generator() 25 { 26 try { 27 yield []; 28 } finally { 29 make_iterator(); 30 } 31 } 32 33 function make_iterator() 34 { 35 var iter = generator(); 36 iter.next(); 37 iter = null; 38 if (typeof alert != 'undefined') 39 { 40 alert(++ialert); 41 } 42 } 43 44 make_iterator(); 45 46 // Trigger GC through the branch callback. 47 for (var i = 0; i != 50000; ++i) { 48 var x = {}; 49 } 50 51 print('done'); 52 reportCompare(expect, actual, summary); 53 } 54 55 function init() 56 { 57 // give the dialog closer time to register 58 setTimeout('runtest()', 5000); 59 } 60 61 function runtest() 62 { 63 test(); 64 reportCompare(expect, actual, summary); 65 gDelayTestDriverEnd = false; 66 jsTestDriverEnd(); 67 } 68 69 // delay test driver end 70 gDelayTestDriverEnd = true; 71 72 window.addEventListener("load", init, false);