michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* michael@0: * michael@0: * Date: 16 Mar 2002 michael@0: * SUMMARY: Shouldn't crash if define |var arguments| inside a function michael@0: * See http://bugzilla.mozilla.org/show_bug.cgi?id=131510 michael@0: * michael@0: */ michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 131510; michael@0: var summary = "Shouldn't crash if define |var arguments| inside a function"; michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus(summary); michael@0: michael@0: michael@0: function f() {var arguments;} michael@0: f(); michael@0: michael@0: michael@0: /* michael@0: * Put same example in function scope instead of global scope michael@0: */ michael@0: function g() { function f() {var arguments;}; f();}; michael@0: g(); michael@0: michael@0: michael@0: /* michael@0: * Put these examples in eval scope michael@0: */ michael@0: var s = 'function f() {var arguments;}; f();'; michael@0: eval(s); michael@0: michael@0: s = 'function g() { function f() {var arguments;}; f();}; g();'; michael@0: eval(s); michael@0: michael@0: reportCompare('No Crash', 'No Crash', '');