js/src/tests/js1_5/Regress/regress-131510-001.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:3febab083648
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 /*
7 *
8 * Date: 16 Mar 2002
9 * SUMMARY: Shouldn't crash if define |var arguments| inside a function
10 * See http://bugzilla.mozilla.org/show_bug.cgi?id=131510
11 *
12 */
13 //-----------------------------------------------------------------------------
14 var BUGNUMBER = 131510;
15 var summary = "Shouldn't crash if define |var arguments| inside a function";
16 printBugNumber(BUGNUMBER);
17 printStatus(summary);
18
19
20 function f() {var arguments;}
21 f();
22
23
24 /*
25 * Put same example in function scope instead of global scope
26 */
27 function g() { function f() {var arguments;}; f();};
28 g();
29
30
31 /*
32 * Put these examples in eval scope
33 */
34 var s = 'function f() {var arguments;}; f();';
35 eval(s);
36
37 s = 'function g() { function f() {var arguments;}; f();}; g();';
38 eval(s);
39
40 reportCompare('No Crash', 'No Crash', '');

mercurial