Debian Codegraph @

rhino/testsrc/tests/js1_5/extensions/regress-237461.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 var gTestfile = 'regress-237461.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 237461;
9 var summary = 'don\'t crash with nested function collides with var';
10 var actual = 'Crash';
11 var expect = 'No Crash';
12
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
15
16 function g()
17 {
18 var core = {};
19 core.js = {};
20 core.js.init = function()
21 {
22 var loader = null;
23
24 function loader() {}
25 };
26 return core;
27 }
28
29 if (typeof Script == 'undefined')
30 {
31 print('Test skipped. Script not defined.');
32 }
33 else
34 {
35 var s = new Script(""+g.toString());
36 try
37 {
38 var frozen = s.freeze(); // crash.
39 printStatus("len:" + frozen.length);
40 }
41 catch(e)
42 {
43 }
44 }
45 actual = 'No Crash';
46
47 reportCompare(expect, actual, summary);