regress-255245.js (770B)
1 // |reftest| skip-if(!Function.prototype.toSource) 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 = 255245; 10 var summary = 'Function.prototype.toSource/.toString show "setrval" instead of "return"'; 11 var actual = ''; 12 var expect = ''; 13 14 printBugNumber(BUGNUMBER); 15 printStatus (summary); 16 17 function f() { 18 try { 19 } catch (e) { 20 return false; 21 } 22 finally { 23 } 24 } 25 26 expect = -1; 27 actual = f.toSource().indexOf('setrval'); 28 29 reportCompare(expect, actual, summary);