js/src/tests/js1_5/extensions/regress-342960.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 // |reftest| skip-if(!xulRuntime.shell&&(Android||xulRuntime.OS=="WINNT"||xulRuntime.OS=="Linux")) silentfail slow -- bug 528464
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     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/. */
     7 //-----------------------------------------------------------------------------
     8 var BUGNUMBER = 342960;
     9 var summary = 'Do not crash on large string toSource';
    10 var actual = 'No Crash';
    11 var expect = 'No Crash';
    14 //-----------------------------------------------------------------------------
    15 test();
    16 //-----------------------------------------------------------------------------
    18 function test()
    19 {
    20   enterFunc ('test');
    21   printBugNumber(BUGNUMBER);
    22   printStatus (summary);
    24   expectExitCode(0);
    25   expectExitCode(5);
    27   function v()
    28   {
    29     var meg="";
    30     var r="";
    31     var i;
    32     print("don't interrupt the script. let it go.");
    33     for(i=0;i<1024*1024;i++) meg += "v";
    34     for(i=0;i<1024/8;i++) r += meg;
    35     var o={f1: r, f2: r, f3: r,f4: r,f5: r, f6: r, f7: r, f8: r,f9: r};
    36     print('done obj');
    37     var rr=r.toSource();
    38     print('done toSource()');
    39   }
    41   v();
    43   reportCompare(expect, actual, summary);
    45   exitFunc ('test');
    46 }

mercurial