12.14-15.js (745B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 es5id: 12.14-15 6 description: > 7 Exception object is a function which is a property of an object, 8 when an exception parameter is called as a function in catch 9 block, global object is passed as the this value 10 flags: [noStrict] 11 ---*/ 12 13 var global = this; 14 var result; 15 16 (function() { 17 var obj = {}; 18 obj.test = function () { 19 this._12_14_15_foo = "test"; 20 }; 21 try { 22 throw obj.test; 23 } catch (e) { 24 e(); 25 result = global._12_14_15_foo; 26 } 27 })(); 28 29 assert.sameValue(result, "test", 'result'); 30 31 reportCompare(0, 0);