| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-375183.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 375183; |
| 9 |
var summary = '__noSuchMethod__ should not allocate beyond fp->script->depth'; |
| 10 |
var actual = 'No Crash'; |
| 11 |
var expect = 'No Crash'; |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
test(); |
| 16 |
|
| 17 |
|
| 18 |
function test() |
| 19 |
{ |
| 20 |
enterFunc ('test'); |
| 21 |
printBugNumber(BUGNUMBER); |
| 22 |
printStatus (summary); |
| 23 |
|
| 24 |
var obj = { get __noSuchMethod__() { |
| 25 |
print("Executed"); |
| 26 |
return new Object(); |
| 27 |
}}; |
| 28 |
|
| 29 |
try |
| 30 |
{ |
| 31 |
obj.x(); |
| 32 |
} |
| 33 |
catch(ex) |
| 34 |
{ |
| 35 |
} |
| 36 |
|
| 37 |
reportCompare(expect, actual, summary + ':1'); |
| 38 |
|
| 39 |
obj = { __noSuchMethod__: {} }; |
| 40 |
try |
| 41 |
{ |
| 42 |
obj.x(); |
| 43 |
} |
| 44 |
catch(ex) |
| 45 |
{ |
| 46 |
} |
| 47 |
|
| 48 |
reportCompare(expect, actual, summary + ':2'); |
| 49 |
|
| 50 |
obj = { } |
| 51 |
obj.__noSuchMethod__ = {}; |
| 52 |
try |
| 53 |
{ |
| 54 |
obj.x(); |
| 55 |
} |
| 56 |
catch(ex) |
| 57 |
{ |
| 58 |
} |
| 59 |
|
| 60 |
reportCompare(expect, actual, summary + ':3'); |
| 61 |
|
| 62 |
exitFunc ('test'); |
| 63 |
} |