js/src/tests/js1_8_1/regress/regress-452498-123.js

branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
equal deleted inserted replaced
-1:000000000000 0:3ee4880c7efc
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 var BUGNUMBER = 452498;
8 var summary = 'TM: upvar2 regression tests';
9 var actual = '';
10 var expect = '';
11
12
13 //-----------------------------------------------------------------------------
14 test();
15 //-----------------------------------------------------------------------------
16
17 function test()
18 {
19 enterFunc ('test');
20 printBugNumber(BUGNUMBER);
21 printStatus (summary);
22
23
24 // ------- Comment #123 From Gary Kwong [:nth10sd]
25
26 // Does not require -j:
27 // =====
28 try
29 {
30 eval('y = (function (){y} for (x in []);');
31 }
32 catch(ex)
33 {
34 }
35
36 // Assertion failure: !(pn->pn_dflags & flag), at ../jsparse.h:651
37 // =====
38 (function(){for(var x = arguments in []){} function x(){}})();
39
40 // Assertion failure: dn->pn_defn, at ../jsemit.cpp:1873
41 // =====
42
43
44 // Requires -j:
45 // =====
46 (function(){ eval("for (x in ['', {}, '', {}]) { this; }" )})();
47
48 // Assertion failure: fp->thisp == JSVAL_TO_OBJECT(fp->argv[-1]), at ../jstracer.cpp:4172
49 // =====
50 for each (let x in ['', '', '']) { (new function(){} )}
51
52 // Assertion failure: scope->object == ctor, at ../jsbuiltins.cpp:236
53 // Opt crash [@ js_FastNewObject] near null
54 // =====
55
56 reportCompare(expect, actual, summary);
57
58 exitFunc ('test');
59 }

mercurial