js/src/tests/js1_8/extensions/regress-479381.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 // |reftest| skip
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     3 /*
     4  * Any copyright is dedicated to the Public Domain.
     5  * http://creativecommons.org/licenses/publicdomain/
     6  * Contributor: Jason Orendorff
     7  */
     9 //-----------------------------------------------------------------------------
    10 var BUGNUMBER = 479381;
    11 var summary = 'Do not crash @ js_FinalizeStringRT with multi-threads.';
    12 var actual = '';
    13 var expect = '';
    16 //-----------------------------------------------------------------------------
    17 test();
    18 //-----------------------------------------------------------------------------
    20 function test()
    21 {
    22   enterFunc ('test');
    23   printBugNumber(BUGNUMBER);
    24   printStatus (summary);
    26   if (typeof gczeal != 'function' || typeof scatter != 'function')
    27   {
    28     print(expect = actual = 'Test skipped: requires mulithreads');
    29   }
    30   else
    31   {
    32     expect = actual = 'No Crash';
    34     gczeal(2);
    36     function f() {
    37       var s;
    38       for (var i = 0; i < 9999; i++)
    39         s = 'a' + String(i)[3] + 'b';
    40       return s;
    41     }
    43     print(scatter([f, f, f, f]));
    45     gczeal(0);
    46   }
    48   reportCompare(expect, actual, summary);
    50   exitFunc ('test');
    51 }

mercurial