summaryrefslogtreecommitdiff
path: root/js/src/tests/js1_5/extensions/regress-543839.js
blob: 9f7cef0ff7524521d136d9ffb20106b46b217129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 * Contributor: Igor Bukanov
 */

//-----------------------------------------------------------------------------
var BUGNUMBER = 543839;
var summary = 'js_GetMutableScope caller must lock the object';
var actual;
var expect = 1;

printBugNumber(BUGNUMBER);
printStatus (summary);

jit(true);

function test()
{
    jit(true);
    for (var i = 0; i != 100; ++i)
        var tmp = { a: 1 };
    return 1;
}

if (typeof evalcx == 'undefined')
{
    print('Skipping. This test requires evalcx.');
    actual = expect;
} else {
    test();
    test();
    test();
    actual = evalcx("test()", this);
}

reportCompare(expect, actual, summary);