Debian Codegraph @

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

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 gTestfile = 'regress-319872.js';
7
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = 319872;
10 var summary = 'Do not Crash in jsxml.c';
11 var actual = 'No Crash';
12 var expect = 'No Crash';
13
14 printBugNumber(BUGNUMBER);
15 START(summary);
16 printStatus ("Expect either no error, out of memory or catchable script stack " +
17 "space quota is exhausted error");
18 expectExitCode(0);
19 expectExitCode(3);
20 expectExitCode(5);
21
22 try
23 {
24 var i,m,str;
25 str="<a xmlns:v=\"";
26 m="";
27
28 for (i=0;i<(1024*1024)/2;i++)
29 m += "\n";
30
31 for(i=0;i<500;i++)
32 str += m ;
33
34 str += "\">f00k</a>";
35
36 var xx = new XML(str);
37
38 printStatus(xx.toXMLString());
39 }
40 catch(ex)
41 {
42 expect = 'InternalError: script stack space quota is exhausted';
43 actual = ex + '';
44 print(actual);
45 }
46 TEST(1, expect, actual);