| Index: test/webkit/try-try-return-finally-finally.js
|
| diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/try-try-return-finally-finally.js
|
| similarity index 75%
|
| copy from test/webkit/concat-while-having-a-bad-time.js
|
| copy to test/webkit/try-try-return-finally-finally.js
|
| index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..8eef64252dae80359e61fffdf93db9f8adb2640f 100644
|
| --- a/test/webkit/concat-while-having-a-bad-time.js
|
| +++ b/test/webkit/try-try-return-finally-finally.js
|
| @@ -22,10 +22,27 @@
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| description(
|
| -"Tests the behavior of Array.prototype.concat while the array is having a bad time due to one of the elements we are concatenating."
|
| +"Tests what would happen if you have nested try-finally's with interesting control statements nested within them. The correct outcome is for this test to not crash during bytecompilation."
|
| );
|
|
|
| -Object.defineProperty(Array.prototype, 0, { writable: false });
|
| -shouldBe("[42].concat()", "[42]");
|
| +function foo() {
|
| + try{
|
| + while(a){
|
| + try{
|
| + if(b){return}
|
| + }finally{
|
| + c();
|
| + }
|
| + if(d){return}
|
| + }
|
| + }finally{
|
| + e();
|
| + }
|
| +}
|
|
|
| +try {
|
| + foo();
|
| +} catch (e) {
|
| + testPassed("It worked.");
|
| +}
|
|
|
|
|