| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-237461.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 237461; |
| 9 |
var summary = 'don\'t crash with nested function collides with var'; |
| 10 |
var actual = 'Crash'; |
| 11 |
var expect = 'No Crash'; |
| 12 |
|
| 13 |
printBugNumber(BUGNUMBER); |
| 14 |
printStatus (summary); |
| 15 |
|
| 16 |
function g() |
| 17 |
{ |
| 18 |
var core = {}; |
| 19 |
core.js = {}; |
| 20 |
core.js.init = function() |
| 21 |
{ |
| 22 |
var loader = null; |
| 23 |
|
| 24 |
function loader() {} |
| 25 |
}; |
| 26 |
return core; |
| 27 |
} |
| 28 |
|
| 29 |
if (typeof Script == 'undefined') |
| 30 |
{ |
| 31 |
print('Test skipped. Script not defined.'); |
| 32 |
} |
| 33 |
else |
| 34 |
{ |
| 35 |
var s = new Script(""+g.toString()); |
| 36 |
try |
| 37 |
{ |
| 38 |
var frozen = s.freeze(); |
| 39 |
printStatus("len:" + frozen.length); |
| 40 |
} |
| 41 |
catch(e) |
| 42 |
{ |
| 43 |
} |
| 44 |
} |
| 45 |
actual = 'No Crash'; |
| 46 |
|
| 47 |
reportCompare(expect, actual, summary); |