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: * Date: 21 Feb 2001 michael@0: * See http://bugzilla.mozilla.org/show_bug.cgi?id=69607 michael@0: * michael@0: * SUMMARY: testing that we don't crash on trivial JavaScript michael@0: * michael@0: */ michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 69607; michael@0: var summary = "Testing that we don't crash on trivial JavaScript"; michael@0: var var1; michael@0: var var2; michael@0: var var3; michael@0: michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus (summary); michael@0: michael@0: /* michael@0: * The crash this bug reported was caused by precisely these lines michael@0: * placed in top-level code (i.e. not wrapped inside a function) - michael@0: */ michael@0: if(false) michael@0: { michael@0: var1 = 0; michael@0: } michael@0: else michael@0: { michael@0: var2 = 0; michael@0: } michael@0: michael@0: if(false) michael@0: { michael@0: var3 = 0; michael@0: } michael@0: michael@0: reportCompare('No Crash', 'No Crash', ''); michael@0: