diff --git a/dom/ipc/tests/mochitest.ini b/dom/ipc/tests/mochitest.ini index 185334689d6..177b37df22d 100644 --- a/dom/ipc/tests/mochitest.ini +++ b/dom/ipc/tests/mochitest.ini @@ -16,7 +16,7 @@ skip-if = buildapp == 'b2g' || buildapp == 'mulet' [test_NuwaProcessCreation.html] skip-if = toolkit != 'gonk' [test_NuwaProcessDeadlock.html] -skip-if = true # bug 1166923 +skip-if = toolkit != 'gonk' [test_child_docshell.html] skip-if = toolkit == 'cocoa' # disabled due to hangs, see changeset 6852e7c47edf [test_CrashService_crash.html] diff --git a/dom/ipc/tests/test_NuwaProcessDeadlock.html b/dom/ipc/tests/test_NuwaProcessDeadlock.html index 1029aa1aa9b..150707f5b3b 100644 --- a/dom/ipc/tests/test_NuwaProcessDeadlock.html +++ b/dom/ipc/tests/test_NuwaProcessDeadlock.html @@ -14,6 +14,9 @@ Test if Nuwa process created successfully. function runTest() { + info("Shut down processes by disabling process prelaunch"); + SpecialPowers.setBoolPref('dom.ipc.processPrelaunch.enabled', false); + info("Launch the Nuwa process"); let cpmm = SpecialPowers.Cc["@mozilla.org/childprocessmessagemanager;1"] .getService(SpecialPowers.Ci.nsISyncMessageSender); @@ -22,12 +25,11 @@ function runTest() receiveMessage: function receiveMessage(msg) { msg = SpecialPowers.wrap(msg); if (msg.name == 'TEST-ONLY:nuwa-ready') { - ok(true, "Got nuwa-ready"); - is(seenNuwaReady, false, "Already received nuwa ready"); + is(seenNuwaReady, false, "The Nuwa process is launched"); seenNuwaReady = true; } else if (msg.name == 'TEST-ONLY:nuwa-add-new-process') { ok(true, "Got nuwa-add-new-process"); - is(seenNuwaReady, true, "Receive nuwa-add-new-process before nuwa-ready"); + is(seenNuwaReady, true, "The preallocated process is launched from the Nuwa process"); shutdown(); } } @@ -51,12 +53,11 @@ function runTest() function setup() { - info("Set up preferences for testing deadlock in the Nuwa process."); + info("Set up preferences for testing the Nuwa process."); SimpleTest.waitForExplicitFinish(); SpecialPowers.pushPrefEnv({ 'set': [ - ['dom.ipc.processPrelaunch.enabled', false], ['dom.ipc.preallocatedProcessManager.testMode', true], ['dom.ipc.processPrelaunch.testMode', true] // For testing deadlock ] diff --git a/xpcom/threads/TimerThread.cpp b/xpcom/threads/TimerThread.cpp index 2bf92bc999f..9eeda7a93c7 100644 --- a/xpcom/threads/TimerThread.cpp +++ b/xpcom/threads/TimerThread.cpp @@ -430,7 +430,11 @@ TimerThread::Run() bool forceRunThisTimer = forceRunNextTimer; forceRunNextTimer = false; - if (mSleeping) { + if (mSleeping +#ifdef MOZ_NUWA_PROCESS + || IsNuwaProcess() // Don't fire timers or deadlock will result. +#endif + ) { // Sleep for 0.1 seconds while not firing timers. uint32_t milliseconds = 100; if (ChaosMode::isActive(ChaosFeature::TimerScheduling)) {