Debian Codegraph @

rhino/testsrc/tests/e4x/Regress/regress-394941.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 gTestfile = 'regress-394941.js';
8
9 var summary = 'Infinite recursion should throw catchable exception';
10 var BUGNUMBER = 394941;
11 var actual = '';
12 var expect = /InternalError: (script stack space quota is exhausted|too much recursion)/;
13
14 /*
15 * use the reportMatch so that the test will pass on 1.8
16 * where the error message is "too much recursion" and on 1.9.0
17 * where the error message is "script stack space quota is exhausted".
18 */
19
20 printBugNumber(BUGNUMBER);
21 START(summary);
22
23 try
24 {
25 function f() { var z = <x><y/></x>; f(); }
26 f();
27 }
28 catch(ex)
29 {
30 actual = ex + '';
31 print("Caught: " + ex);
32 }
33
34 reportMatch(expect, actual);
35
36 END();