| "This test checks that JavaScriptCore does not crash when uwinding the stack that includes a host function." |
| function twoHostFunctions() { |
| stack.push({ "args": twoHostFunctions.arguments }); |
| stack.push({ "args": twoHostFunctions.arguments }); |
| testPassed("Two host functions called in a row."); |
| function arrayOperatorFunction(element) { |
| var myArray = new Array (0, 1, 2); |
| function hostCallsUser(array) { |
| return array.map(arrayOperatorFunction); |
| function throwException() { |
| throw "Exception thrown"; |
| function hostAndException() { |
| stack.push({ "args": hostAndException.arguments }); |
| myArray = hostCallsUser(myArray); |
| shouldBe('myArray', 'new Array( 5, 6, 7 )'); |
| testPassed("Exception thrown and caught"); |