js/src/tests/js1_5/Regress/regress-69607.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/js1_5/Regress/regress-69607.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +/*
    1.10 + * Date: 21 Feb 2001
    1.11 + * See http://bugzilla.mozilla.org/show_bug.cgi?id=69607
    1.12 + *
    1.13 + * SUMMARY:  testing that we don't crash on trivial JavaScript
    1.14 + *
    1.15 + */
    1.16 +//-----------------------------------------------------------------------------
    1.17 +var BUGNUMBER = 69607;
    1.18 +var summary = "Testing that we don't crash on trivial JavaScript";
    1.19 +var var1;
    1.20 +var var2;
    1.21 +var var3;
    1.22 +
    1.23 +printBugNumber(BUGNUMBER);
    1.24 +printStatus (summary);
    1.25 +
    1.26 +/*
    1.27 + * The crash this bug reported was caused by precisely these lines
    1.28 + * placed in top-level code (i.e. not wrapped inside a function) -
    1.29 + */
    1.30 +if(false)
    1.31 +{
    1.32 +  var1 = 0;
    1.33 +}
    1.34 +else
    1.35 +{
    1.36 +  var2 = 0;
    1.37 +}
    1.38 +
    1.39 +if(false)
    1.40 +{
    1.41 +  var3 = 0;
    1.42 +}
    1.43 +
    1.44 +reportCompare('No Crash', 'No Crash', '');
    1.45 +

mercurial