~ubuntu-branches/ubuntu/trusty/mozjs17/trusty

« back to all changes in this revision

Viewing changes to js/src/tests/e4x/GC/regress-280844-2.js

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2013-05-25 12:24:23 UTC
  • Revision ID: package-import@ubuntu.com-20130525122423-zmxucrhtensw90xy
Tags: upstream-17.0.0
ImportĀ upstreamĀ versionĀ 17.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// |reftest| pref(javascript.options.xml.content,true) skip-if(Android)
 
2
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 
3
/* This Source Code Form is subject to the terms of the Mozilla Public
 
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
6
 
 
7
 
 
8
var summary = 'Uncontrolled recursion in js_MarkXML during GC';
 
9
var BUGNUMBER = 280844;
 
10
var actual = 'No Crash';
 
11
var expect = 'No Crash';
 
12
 
 
13
printBugNumber(BUGNUMBER);
 
14
START(summary);
 
15
 
 
16
var N = 100 * 1000;
 
17
 
 
18
function prepare_list(N)
 
19
{
 
20
    var head = {};
 
21
    var cursor = head;
 
22
    for (var i = 0; i != N; ++i) {
 
23
        var ns = new Namespace(); 
 
24
        var x = <xml/>;
 
25
        x.addNamespace(ns);
 
26
        cursor.next = x;
 
27
        cursor = ns;
 
28
    }
 
29
    return head;
 
30
}
 
31
 
 
32
var head = prepare_list(N);
 
33
 
 
34
gc();
 
35
 
 
36
TEST(1, expect, actual);
 
37
 
 
38
END();