Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 /// Copyright (c) 2012 Ecma International. All rights reserved.
2 /// Ecma International makes this code available under the terms and conditions set
3 /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
4 /// "Use Terms"). Any redistribution of this code must retain the above
5 /// copyright and this notice and otherwise comply with the Use Terms.
6 /**
7 * @path ch12/12.14/12.14-13.js
8 * @description catch introduces scope - updates are based on scope
9 */
12 function testcase() {
13 var res1 = false;
14 var res2 = false;
15 var res3 = false;
17 var x_12_14_13 = 'local';
18 try {
19 function foo() {
20 this.x_12_14_13 = 'instance';
21 }
23 try {
24 throw foo;
25 }
26 catch (e) {
27 res1 = (x_12_14_13 === 'local');
28 e();
29 res2 = (x_12_14_13 === 'local');
30 }
31 res3 = (x_12_14_13 === 'local');
33 if (res1 === true &&
34 res2 === true &&
35 res3 === true) {
36 return true;
37 }
38 } finally {
39 delete this.x_12_14_13;
40 }
41 }
42 runTestCase(testcase);