1diff -ruN deps.orig/mozilla/js/src/shell/Makefile.in deps/mozilla/js/src/shell/Makefile.in 2--- deps.orig/mozilla/js/src/shell/Makefile.in 2014-06-30 08:54:39 UTC 3+++ deps/mozilla/js/src/shell/Makefile.in 4@@ -47,7 +47,6 @@ 5 PROGRAM = js$(BIN_SUFFIX) 6 CPPSRCS = \ 7 js.cpp \ 8- jsworkers.cpp \ 9 $(NULL) 10 11 DEFINES += -DEXPORT_JS_API 12diff -ruN deps.orig/mozilla/js/src/shell/js.cpp deps/mozilla/js/src/shell/js.cpp 13--- deps.orig/mozilla/js/src/shell/js.cpp 2014-06-30 08:54:39 UTC 14+++ deps/mozilla/js/src/shell/js.cpp 15@@ -91,8 +91,6 @@ 16 #endif /* JSDEBUGGER_C_UI */ 17 #endif /* JSDEBUGGER */ 18 19-#include "jsworkers.h" 20- 21 #include "jsinterpinlines.h" 22 #include "jsobjinlines.h" 23 #include "jsscriptinlines.h" 24@@ -194,10 +192,6 @@ 25 JSBool gQuitting = JS_FALSE; 26 FILE *gErrFile = NULL; 27 FILE *gOutFile = NULL; 28-#ifdef JS_THREADSAFE 29-JSObject *gWorkers = NULL; 30-js::workers::ThreadPool *gWorkerThreadPool = NULL; 31-#endif 32 33 static JSBool reportWarnings = JS_TRUE; 34 static JSBool compileOnly = JS_FALSE; 35@@ -1324,10 +1318,6 @@ 36 JS_ConvertArguments(cx, argc, JS_ARGV(cx, vp), "/ i", &gExitCode); 37 38 gQuitting = JS_TRUE; 39-#ifdef JS_THREADSAFE 40- if (gWorkerThreadPool) 41- js::workers::terminateAll(JS_GetRuntime(cx), gWorkerThreadPool); 42-#endif 43 return JS_FALSE; 44 } 45 46@@ -4164,10 +4154,6 @@ 47 gCanceled = true; 48 if (gExitCode == 0) 49 gExitCode = EXITCODE_TIMEOUT; 50-#ifdef JS_THREADSAFE 51- if (gWorkerThreadPool) 52- js::workers::terminateAll(rt, gWorkerThreadPool); 53-#endif 54 JS_TriggerAllOperationCallbacks(rt); 55 56 static const char msg[] = "Script runs for too long, terminating.\n"; 57@@ -5695,29 +5681,8 @@ 58 #endif /* JSDEBUGGER_C_UI */ 59 #endif /* JSDEBUGGER */ 60 61-#ifdef JS_THREADSAFE 62- class ShellWorkerHooks : public js::workers::WorkerHooks { 63- public: 64- JSObject *newGlobalObject(JSContext *cx) { 65- return NewGlobalObject(cx, NEW_COMPARTMENT); 66- } 67- }; 68- ShellWorkerHooks hooks; 69- if (!JS_AddNamedObjectRoot(cx, &gWorkers, "Workers") || 70- (gWorkerThreadPool = js::workers::init(cx, &hooks, glob, &gWorkers)) == NULL) { 71- return 1; 72- } 73-#endif 74- 75 int result = ProcessArgs(cx, glob, argv, argc); 76 77-#ifdef JS_THREADSAFE 78- js::workers::finish(cx, gWorkerThreadPool); 79- JS_RemoveObjectRoot(cx, &gWorkers); 80- if (result == 0) 81- result = gExitCode; 82-#endif 83- 84 #ifdef JSDEBUGGER 85 if (jsdc) { 86 #ifdef JSDEBUGGER_C_UI 87diff -ruN deps.orig/mozilla/js/src/shell/jsworkers.h deps/mozilla/js/src/shell/jsworkers.h 88--- deps.orig/mozilla/js/src/shell/jsworkers.h 2014-06-30 08:54:39 UTC 89+++ deps/mozilla/js/src/shell/jsworkers.h 90@@ -1,93 +0,0 @@ 91-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 92- * vim: set ts=8 sw=4 et tw=99: 93- * 94- * ***** BEGIN LICENSE BLOCK ***** 95- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 96- * 97- * The contents of this file are subject to the Mozilla Public License Version 98- * 1.1 (the "License"); you may not use this file except in compliance with 99- * the License. You may obtain a copy of the License at 100- * http://www.mozilla.org/MPL/ 101- * 102- * Software distributed under the License is distributed on an "AS IS" basis, 103- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 104- * for the specific language governing rights and limitations under the 105- * License. 106- * 107- * The Original Code is JavaScript shell workers. 108- * 109- * The Initial Developer of the Original Code is 110- * Mozilla Corporation. 111- * Portions created by the Initial Developer are Copyright (C) 2010 112- * the Initial Developer. All Rights Reserved. 113- * 114- * Contributor(s): 115- * Jason Orendorff <jorendorff@mozilla.com> 116- * 117- * Alternatively, the contents of this file may be used under the terms of 118- * either of the GNU General Public License Version 2 or later (the "GPL"), 119- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 120- * in which case the provisions of the GPL or the LGPL are applicable instead 121- * of those above. If you wish to allow use of your version of this file only 122- * under the terms of either the GPL or the LGPL, and not to allow others to 123- * use your version of this file under the terms of the MPL, indicate your 124- * decision by deleting the provisions above and replace them with the notice 125- * and other provisions required by the GPL or the LGPL. If you do not delete 126- * the provisions above, a recipient may use your version of this file under 127- * the terms of any one of the MPL, the GPL or the LGPL. 128- * 129- * ***** END LICENSE BLOCK ***** */ 130- 131-#ifndef jsworkers_h___ 132-#define jsworkers_h___ 133- 134-#ifdef JS_THREADSAFE 135- 136-#include "jsapi.h" 137- 138-/* 139- * Workers for the JS shell. 140- * 141- * Note: The real implementation of DOM Workers is in dom/src/threads. 142- */ 143-namespace js { 144- namespace workers { 145- class ThreadPool; 146- 147- class WorkerHooks { 148- public: 149- virtual JSObject *newGlobalObject(JSContext *cx) = 0; 150- virtual ~WorkerHooks() {} 151- }; 152- 153- /* 154- * Initialize workers. This defines the Worker constructor on global. 155- * Requires request. rootp must point to a GC root. 156- * 157- * On success, *rootp receives a pointer to an object, and init returns 158- * a non-null value. The caller must keep the object rooted and must 159- * pass it to js::workers::finish later. 160- */ 161- ThreadPool *init(JSContext *cx, WorkerHooks *hooks, JSObject *global, JSObject **rootp); 162- 163- /* Asynchronously signal for all workers to terminate. 164- * 165- * Call this before calling finish() to shut down without waiting for 166- * all messages to be proceesed. 167- */ 168- void terminateAll(JSRuntime *rt, ThreadPool *tp); 169- 170- /* 171- * Finish running any workers, shut down the thread pool, and free all 172- * resources associated with workers. The application must call this 173- * before shutting down the runtime, and not during GC. 174- * 175- * Requires request. 176- */ 177- void finish(JSContext *cx, ThreadPool *tp); 178- } 179-} 180- 181-#endif /* JS_THREADSAFE */ 182- 183-#endif /* jsworkers_h___ */ 184diff -ruN deps.orig/mozilla/js/src/tests/browser.js deps/mozilla/js/src/tests/browser.js 185--- deps.orig/mozilla/js/src/tests/browser.js 2014-06-30 08:54:39 UTC 186+++ deps/mozilla/js/src/tests/browser.js 187@@ -767,17 +767,6 @@ 188 document.write(s); 189 } 190 191-var JSTest = { 192- waitForExplicitFinish: function () { 193- gDelayTestDriverEnd = true; 194- }, 195- 196- testFinished: function () { 197- gDelayTestDriverEnd = false; 198- jsTestDriverEnd(); 199- } 200-}; 201- 202 function jsTestDriverEnd() 203 { 204 // gDelayTestDriverEnd is used to 205diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/jstests.list deps/mozilla/js/src/tests/js1_8_5/extensions/jstests.list 206--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/jstests.list 2014-06-30 08:54:39 UTC 207+++ deps/mozilla/js/src/tests/js1_8_5/extensions/jstests.list 208@@ -1,13 +1,6 @@ 209 url-prefix ../../jsreftest.html?test=js1_8_5/extensions/ 210 script typedarray.js 211 script typedarray-prototype.js 212-skip-if(!xulRuntime.shell) script worker-error.js # these tests sometimes hang in browser, bug 559954, bug 562333 213-skip-if(!xulRuntime.shell) script worker-error-propagation.js 214-skip-if(!xulRuntime.shell) script worker-fib.js 215-skip-if(!xulRuntime.shell) script worker-init.js 216-skip-if(!xulRuntime.shell) script worker-simple.js 217-skip-if(!xulRuntime.shell) script worker-terminate.js 218-skip-if(!xulRuntime.shell) script worker-timeout.js 219 script scripted-proxies.js 220 script array-length-protochange.js 221 script parseInt-octal.js 222diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-error-child.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-error-child.js 223--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-error-child.js 2014-06-30 08:54:39 UTC 224+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-error-child.js 225@@ -1,9 +0,0 @@ 226-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 227-/* 228- * Any copyright is dedicated to the Public Domain. 229- * http://creativecommons.org/licenses/publicdomain/ 230- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 231- */ 232-function onmessage(event) { 233- throw new Error("fail"); 234-} 235diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-error-propagation-child.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-error-propagation-child.js 236--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-error-propagation-child.js 2014-06-30 08:54:39 UTC 237+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-error-propagation-child.js 238@@ -1,16 +0,0 @@ 239-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 240-/* 241- * Any copyright is dedicated to the Public Domain. 242- * http://creativecommons.org/licenses/publicdomain/ 243- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 244- */ 245- 246-function onmessage(event) { 247- var n = +event.data; 248- if (n == 0) 249- throw new Error("boom"); 250- var w = new Worker(workerDir + "worker-error-propagation-child.js"); 251- w.onmessage = function (event) { postMessage(event.data); }; 252- // No w.onerror here. We are testing error propagation when it is absent. 253- w.postMessage(n - 1 + ""); 254-} 255diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-error-propagation.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-error-propagation.js 256--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-error-propagation.js 2014-06-30 08:54:39 UTC 257+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-error-propagation.js 258@@ -1,20 +0,0 @@ 259-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 260-/* 261- * Any copyright is dedicated to the Public Domain. 262- * http://creativecommons.org/licenses/publicdomain/ 263- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 264- */ 265- 266-if (typeof Worker != 'undefined') { 267- JSTest.waitForExplicitFinish(); 268- var w = Worker(workerDir + "worker-error-propagation-child.js"); 269- var errors = 0; 270- w.onmessage = function () { throw new Error("no reply expected"); }; 271- w.onerror = function (event) { 272- reportCompare("string", typeof event.message, "typeof event.message"); 273- JSTest.testFinished(); 274- }; 275- w.postMessage("5"); 276-} else { 277- reportCompare(0, 0, " PASSED! Test skipped. Shell workers required."); 278-} 279diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-error.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-error.js 280--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-error.js 2014-06-30 08:54:39 UTC 281+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-error.js 282@@ -1,21 +0,0 @@ 283-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 284-/* 285- * Any copyright is dedicated to the Public Domain. 286- * http://creativecommons.org/licenses/publicdomain/ 287- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 288- */ 289- 290-if (typeof Worker != 'undefined') { 291- JSTest.waitForExplicitFinish(); 292- 293- // The script throws new Error("fail") on first message. 294- var w = Worker(workerDir + "worker-error-child.js"); 295- var a = []; 296- w.onerror = function (event) { 297- reportCompare("fail", event.message, "worker-error"); 298- JSTest.testFinished(); 299- }; 300- w.postMessage("hello"); 301-} else { 302- reportCompare(0, 0, "Test skipped. Shell workers required."); 303-} 304diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-fib-child.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-fib-child.js 305--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-fib-child.js 2014-06-30 08:54:39 UTC 306+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-fib-child.js 307@@ -1,27 +0,0 @@ 308-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 309-/* 310- * Any copyright is dedicated to the Public Domain. 311- * http://creativecommons.org/licenses/publicdomain/ 312- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 313- */ 314- 315-function onmessage(event) { 316- var a = event.data.split(/\t/); 317- var n = Number(a[0]); 318- var workerDir = a[1]; 319- 320- if (n <= 1) { 321- postMessage("" + n); 322- } else { 323- var w1 = new Worker(workerDir + "worker-fib-child.js"), 324- w2 = new Worker(workerDir + "worker-fib-child.js"); 325- var a = []; 326- w1.onmessage = w2.onmessage = function(event) { 327- a.push(+event.data); 328- if (a.length == 2) 329- postMessage(a[0] + a[1] + ""); 330- }; 331- w1.postMessage(n - 1 + "\t" + workerDir); 332- w2.postMessage(n - 2 + "\t" + workerDir); 333- } 334-} 335diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-fib.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-fib.js 336--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-fib.js 2014-06-30 08:54:39 UTC 337+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-fib.js 338@@ -1,18 +0,0 @@ 339-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 340-/* 341- * Any copyright is dedicated to the Public Domain. 342- * http://creativecommons.org/licenses/publicdomain/ 343- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 344- */ 345- 346-if (typeof Worker != 'undefined') { 347- JSTest.waitForExplicitFinish(); 348- var w = Worker(workerDir + "worker-fib-child.js"); 349- w.onmessage = function (event) { 350- reportCompare("55", event.data, "worker-fib"); 351- JSTest.testFinished(); 352- }; 353- w.postMessage("10\t" + workerDir); // 0 1 1 2 3 5 8 13 21 34 55 354-} else { 355- reportCompare(0, 0, "Test skipped. Shell workers required."); 356-} 357diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-init-child.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-init-child.js 358--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-init-child.js 2014-06-30 08:54:39 UTC 359+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-init-child.js 360@@ -1,8 +0,0 @@ 361-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 362-/* 363- * Any copyright is dedicated to the Public Domain. 364- * http://creativecommons.org/licenses/publicdomain/ 365- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 366- */ 367-postMessage('do your worst'); 368-for (;;) ; 369diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-init.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-init.js 370--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-init.js 2014-06-30 08:54:39 UTC 371+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-init.js 372@@ -1,19 +0,0 @@ 373-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 374-/* 375- * Any copyright is dedicated to the Public Domain. 376- * http://creativecommons.org/licenses/publicdomain/ 377- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 378- */ 379- 380-if (typeof Worker != 'undefined') { 381- JSTest.waitForExplicitFinish(); 382- // Messages sent during initialization are a corner case, but in any case 383- // they should be delivered (no waiting until initialization is complete). 384- var w = new Worker(workerDir + "worker-init-child.js"); // posts a message, then loops forever 385- w.onmessage = function (event) { 386- reportCompare(0, 0, "worker-init"); 387- JSTest.testFinished(); 388- }; 389-} else { 390- reportCompare(0, 0, "Test skipped. Shell workers required."); 391-} 392diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-simple-child.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-simple-child.js 393--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-simple-child.js 2014-06-30 08:54:39 UTC 394+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-simple-child.js 395@@ -1,8 +0,0 @@ 396-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 397-/* 398- * Any copyright is dedicated to the Public Domain. 399- * http://creativecommons.org/licenses/publicdomain/ 400- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 401- */ 402- 403-onmessage = function (event) { postMessage(event.data); }; 404diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-simple.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-simple.js 405--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-simple.js 2014-06-30 08:54:39 UTC 406+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-simple.js 407@@ -1,20 +0,0 @@ 408-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 409-/* 410- * Any copyright is dedicated to the Public Domain. 411- * http://creativecommons.org/licenses/publicdomain/ 412- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 413- */ 414- 415-if (typeof Worker != 'undefined') { 416- JSTest.waitForExplicitFinish(); 417- var w = new Worker(workerDir + "worker-simple-child.js"); 418- var a = []; 419- w.onmessage = function (event) { 420- a.push(event.data); 421- reportCompare(0, 0, "worker-simple"); 422- JSTest.testFinished(); 423- }; 424- w.postMessage("hello"); 425-} else { 426- reportCompare(0, 0, "Test skipped. Shell workers required."); 427-} 428diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate-child.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate-child.js 429--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate-child.js 2014-06-30 08:54:39 UTC 430+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate-child.js 431@@ -1,13 +0,0 @@ 432-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 433-/* 434- * Any copyright is dedicated to the Public Domain. 435- * http://creativecommons.org/licenses/publicdomain/ 436- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 437- */ 438- 439-onmessage = function (event) { 440- var workerDir = event.message; 441- var child = new Worker(workerDir + 'worker-terminate-iloop.js'); // loops forever 442- child.terminate(); 443- postMessage("killed"); 444-}; 445diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate-iloop.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate-iloop.js 446--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate-iloop.js 2014-06-30 08:54:39 UTC 447+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate-iloop.js 448@@ -1,9 +0,0 @@ 449-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 450-/* 451- * Any copyright is dedicated to the Public Domain. 452- * http://creativecommons.org/licenses/publicdomain/ 453- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 454- */ 455- 456-for (;;) 457- ; 458diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate.js 459--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate.js 2014-06-30 08:54:39 UTC 460+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-terminate.js 461@@ -1,37 +0,0 @@ 462-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 463-/* 464- * Any copyright is dedicated to the Public Domain. 465- * http://creativecommons.org/licenses/publicdomain/ 466- * Contributor: Jason Orendorff <jorendorff@mozilla.com> 467- */ 468- 469-if (typeof Worker != 'undefined') { 470- JSTest.waitForExplicitFinish(); 471- 472- // This tests that a parent worker can terminate a child. We run the test 473- // several times serially. If terminate() doesn't work, the runaway Workers 474- // will soon outnumber the number of threads in the thread pool, and we 475- // will deadlock. 476- var i = 0; 477- 478- function next() { 479- if (++i == 10) { 480- reportCompare(0, 0, "worker-terminate"); 481- JSTest.testFinished(); 482- return; 483- } 484- 485- var w = new Worker(workerDir + "worker-terminate-child.js"); 486- w.onmessage = function (event) { 487- reportCompare("killed", event.data, "killed runaway worker #" + i); 488- next(); 489- }; 490- w.onerror = function (event) { 491- reportCompare(0, 1, "Got error: " + event.message); 492- }; 493- w.postMessage(workerDir); 494- } 495- next(); 496-} else { 497- reportCompare(0, 0, "Test skipped. Shell workers required."); 498-} 499diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-timeout-child.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-timeout-child.js 500--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-timeout-child.js 2014-06-30 08:54:39 UTC 501+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-timeout-child.js 502@@ -1,9 +0,0 @@ 503-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 504-/* 505- * Any copyright is dedicated to the Public Domain. 506- * http://creativecommons.org/licenses/publicdomain/ 507- * Contributor: Jason Orendorff 508- */ 509- 510-for (;;) 511- ; 512diff -ruN deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-timeout.js deps/mozilla/js/src/tests/js1_8_5/extensions/worker-timeout.js 513--- deps.orig/mozilla/js/src/tests/js1_8_5/extensions/worker-timeout.js 2014-06-30 08:54:39 UTC 514+++ deps/mozilla/js/src/tests/js1_8_5/extensions/worker-timeout.js 515@@ -1,18 +0,0 @@ 516-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 517-/* 518- * Any copyright is dedicated to the Public Domain. 519- * http://creativecommons.org/licenses/publicdomain/ 520- * Contributor: Jason Orendorff 521- */ 522- 523-if (typeof timeout == 'function' && typeof Worker != 'undefined') { 524- // We don't actually ever call JSTest.testFinished(); instead we 525- // time out and exit the shell with exit code 6. 526- JSTest.waitForExplicitFinish(); 527- expectExitCode(6); 528- timeout(1.0); 529- for (var i = 0; i < 5; i++) 530- new Worker(workerDir + "worker-timeout-child.js"); // just loops forever 531-} else { 532- reportCompare(0, 0, "Test skipped. Shell workers and timeout required."); 533-} 534diff -ruN deps.orig/mozilla/js/src/tests/shell.js deps/mozilla/js/src/tests/shell.js 535--- deps.orig/mozilla/js/src/tests/shell.js 2014-06-30 08:54:39 UTC 536+++ deps/mozilla/js/src/tests/shell.js 537@@ -833,18 +833,6 @@ 538 } 539 } 540 541-var JSTest = { 542- waitForExplicitFinish: function () { 543- gDelayTestDriverEnd = true; 544- }, 545- 546- testFinished: function () { 547- gDelayTestDriverEnd = false; 548- jsTestDriverEnd(); 549- quit(); 550- } 551-}; 552- 553 function jsTestDriverEnd() 554 { 555 // gDelayTestDriverEnd is used to 556