regress-322957.js (804B)
1 // |reftest| skip-if(!this.uneval) 2 3 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ 4 /* This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 8 //----------------------------------------------------------------------------- 9 var BUGNUMBER = 322957; 10 var summary = 'TryMethod should not eat getter exceptions'; 11 var actual = ''; 12 var expect = ''; 13 14 printBugNumber(BUGNUMBER); 15 printStatus (summary); 16 17 var obj = { get toSource() { throw "EXCEPTION"; } }; 18 19 var got_proper_exception = -1; 20 21 try { 22 uneval(obj); 23 } catch (e) { 24 got_proper_exception = (e === "EXCEPTION"); 25 } 26 27 expect = true; 28 actual = got_proper_exception; 29 reportCompare(expect, actual, summary);