js/src/tests/js1_8_1/regress/regress-507424.js

branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
equal deleted inserted replaced
-1:000000000000 0:7c72fe68c8ee
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 = 507424;
8 var summary = 'TM: assert with regexp literal inside closure'
9 var actual = '';
10 var expect = 'do not crash';
11
12
13 //-----------------------------------------------------------------------------
14 start_test();
15 jit(true);
16
17 (new Function("'a'.replace(/a/,function(x){return(/x/ for each(y in[x]))})"))();
18
19 jit(false);
20 actual = 'do not crash'
21 finish_test();
22 //-----------------------------------------------------------------------------
23
24 function start_test()
25 {
26 enterFunc ('test');
27 printBugNumber(BUGNUMBER);
28 printStatus (summary);
29 }
30
31 function finish_test()
32 {
33 reportCompare(expect, actual, summary);
34 exitFunc ('test');
35 }

mercurial