Debian Codegraph @

rhino/testsrc/tests/js1_5/extensions/regress-396326.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-396326.js';
7
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = 396326;
10 var summary = 'Do not assert trying to disassemble get(var|arg) prop';
11 var actual = 'No Crash';
12 var expect = 'No Crash';
13
14
15 //-----------------------------------------------------------------------------
16 test();
17 //-----------------------------------------------------------------------------
18
19 function test()
20 {
21 enterFunc ('test');
22 printBugNumber(BUGNUMBER);
23 printStatus (summary);
24
25 if (typeof dis == 'undefined')
26 {
27 print('disassembly not supported. test skipped.');
28 reportCompare(expect, actual, summary);
29 }
30 else
31 {
32 function f1() { var v; return v.prop };
33 dis(f1);
34 reportCompare(expect, actual, summary +
35 ': function f1() { var v; return v.prop };');
36
37 function f2(arg) { return arg.prop };
38 dis(f2);
39 reportCompare(expect, actual, summary +
40 ': function f2(arg) { return arg.prop };');
41
42 function f3() { return this.prop };
43 dis(f3);
44 reportCompare(expect, actual, summary +
45 ': function f3() { return this.prop };');
46 }
47
48 exitFunc ('test');
49 }