| description("Regression test for https://webkit.org/b/150434."); |
| // This test verifies that we can process an exception thrown from a natively called function |
| // that was tail called from a JS function that was native called itself. |
| // We use bind to create a native wrapper around JS functions. |
| var myException = "This shouldn't crash!"; |
| boundBar = bar.bind(null, 42); |
| boundFoo = foo.bind(null, 41); |
| for (var i = 0; i < 200000; i++) { |
| testFailed("Got wrong result from foo()!"); |
| testPassed("Properly handled an exception from a tail called native function that was called by a native function"); |