Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // |reftest| skip |
michael@0 | 2 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 3 | /* |
michael@0 | 4 | * Any copyright is dedicated to the Public Domain. |
michael@0 | 5 | * http://creativecommons.org/licenses/publicdomain/ |
michael@0 | 6 | * Contributor: Jason Orendorff |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | //----------------------------------------------------------------------------- |
michael@0 | 10 | var BUGNUMBER = 479381; |
michael@0 | 11 | var summary = 'Do not crash @ js_FinalizeStringRT with multi-threads.'; |
michael@0 | 12 | var actual = ''; |
michael@0 | 13 | var expect = ''; |
michael@0 | 14 | |
michael@0 | 15 | |
michael@0 | 16 | //----------------------------------------------------------------------------- |
michael@0 | 17 | test(); |
michael@0 | 18 | //----------------------------------------------------------------------------- |
michael@0 | 19 | |
michael@0 | 20 | function test() |
michael@0 | 21 | { |
michael@0 | 22 | enterFunc ('test'); |
michael@0 | 23 | printBugNumber(BUGNUMBER); |
michael@0 | 24 | printStatus (summary); |
michael@0 | 25 | |
michael@0 | 26 | if (typeof gczeal != 'function' || typeof scatter != 'function') |
michael@0 | 27 | { |
michael@0 | 28 | print(expect = actual = 'Test skipped: requires mulithreads'); |
michael@0 | 29 | } |
michael@0 | 30 | else |
michael@0 | 31 | { |
michael@0 | 32 | expect = actual = 'No Crash'; |
michael@0 | 33 | |
michael@0 | 34 | gczeal(2); |
michael@0 | 35 | |
michael@0 | 36 | function f() { |
michael@0 | 37 | var s; |
michael@0 | 38 | for (var i = 0; i < 9999; i++) |
michael@0 | 39 | s = 'a' + String(i)[3] + 'b'; |
michael@0 | 40 | return s; |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | print(scatter([f, f, f, f])); |
michael@0 | 44 | |
michael@0 | 45 | gczeal(0); |
michael@0 | 46 | } |
michael@0 | 47 | |
michael@0 | 48 | reportCompare(expect, actual, summary); |
michael@0 | 49 | |
michael@0 | 50 | exitFunc ('test'); |
michael@0 | 51 | } |