Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
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/. */
6 //-----------------------------------------------------------------------------
7 var BUGNUMBER = 507424;
8 var summary = 'TM: assert with regexp literal inside closure'
9 var actual = '';
10 var expect = 'do not crash';
13 //-----------------------------------------------------------------------------
14 start_test();
15 jit(true);
17 (new Function("'a'.replace(/a/,function(x){return(/x/ for each(y in[x]))})"))();
19 jit(false);
20 actual = 'do not crash'
21 finish_test();
22 //-----------------------------------------------------------------------------
24 function start_test()
25 {
26 enterFunc ('test');
27 printBugNumber(BUGNUMBER);
28 printStatus (summary);
29 }
31 function finish_test()
32 {
33 reportCompare(expect, actual, summary);
34 exitFunc ('test');
35 }