Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-481436.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-481436.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 481436;
9 var summary = 'TM: Do not crash @ FlushNativeStackFrame/JS_XDRNewMem';
10 var actual = '';
11 var expect = '';
12
13
14 printBugNumber(BUGNUMBER);
15 printStatus (summary);
16
17 jit(true);
18
19 function search(m, n) {
20 if (m.name == n)
21 return m;
22 for (var i = 0; i < m.items.length; i++)
23 if (m.items[i].type == 'M')
24 search(m.items[i], n);
25 }
26
27 function crash() {
28 for (var i = 0; i < 2; i++) {
29 var root = {name: 'root', type: 'M', items: [{}]};
30 search(root, 'x');
31 root.items.push({name: 'tim', type: 'M', items: []});
32 search(root, 'x');
33 search(root, 'x');
34 }
35 }
36
37 crash();
38
39 jit(false);
40
41 reportCompare(expect, actual, summary);