comparison: js/src/jit-test/tests/baseline/try-finally-1.js
js/src/jit-test/tests/baseline/try-finally-1.js
- branch
- TOR_BUG_3246
- changeset 7
- 129ffea94266
equal
deleted
inserted
replaced
|
1 function test1() { |
|
2 try { |
|
3 return "try"; |
|
4 } finally { |
|
5 return "finally"; |
|
6 } |
|
7 } |
|
8 assertEq(test1(), "finally"); |
|
9 |
|
10 function test2() { |
|
11 try { |
|
12 throw 4; |
|
13 } catch(e) { |
|
14 return "catch"; |
|
15 } finally { |
|
16 return "finally"; |
|
17 } |
|
18 } |
|
19 assertEq(test2(), "finally"); |
|
20 |
|
21 function test3() { |
|
22 try { |
|
23 throw 4; |
|
24 } finally { |
|
25 return "finally"; // Don't rethrow. |
|
26 } |
|
27 } |
|
28 assertEq(test3(), "finally"); |