Index: test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js |
diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js |
similarity index 71% |
copy from test/webkit/concat-while-having-a-bad-time.js |
copy to test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js |
index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..140ba7fcf29be8933232d0a53613d046e069252b 100644 |
--- a/test/webkit/concat-while-having-a-bad-time.js |
+++ b/test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js |
@@ -22,10 +22,32 @@ |
// 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 a throwing operation at the beginning of a finally blow that gets inlined inside a complicated catch/finally stack. The correct outcome is for this test to not crash during exception throwing." |
); |
-Object.defineProperty(Array.prototype, 0, { writable: false }); |
-shouldBe("[42].concat()", "[42]"); |
+function foo() { |
+ try{ |
+ N |
+ } catch(x) { |
+ try { |
+ try { |
+ w |
+ } catch(x) { |
+ try { |
+ } finally { |
+ return |
+ } |
+ } |
+ } catch (a) { |
+ } |
+ } finally { |
+ z |
+ } |
+} |
+try { |
+ foo(); |
+} catch (e) { |
+ testPassed("It worked."); |
+} |