diff --git a/dom/ipc/PreallocatedProcessManager.cpp b/dom/ipc/PreallocatedProcessManager.cpp index d9f500b6d08f..85cbfdc267f4 100644 --- a/dom/ipc/PreallocatedProcessManager.cpp +++ b/dom/ipc/PreallocatedProcessManager.cpp @@ -60,7 +60,6 @@ public: void RunAfterPreallocatedProcessReady(nsIRunnable* aRunnable); private: - void OnNuwaForkTimeout(); void NuwaFork(); // initialization off the critical path of app startup. @@ -69,7 +68,6 @@ private: // The array containing the preallocated processes. 4 as the inline storage size // should be enough so we don't need to grow the nsAutoTArray. nsAutoTArray, 4> mSpareProcesses; - nsTArray mNuwaForkWaitTasks; nsTArray > mDelayedContentParentRequests; @@ -312,11 +310,6 @@ PreallocatedProcessManagerImpl::PublishSpareProcess(ContentParent* aContent) JS::NullHandleValue, JS::NullHandleValue, cx, 1); } - if (!mNuwaForkWaitTasks.IsEmpty()) { - mNuwaForkWaitTasks.ElementAt(0)->Cancel(); - mNuwaForkWaitTasks.RemoveElementAt(0); - } - mSpareProcesses.AppendElement(aContent); if (!mDelayedContentParentRequests.IsEmpty()) { @@ -374,28 +367,9 @@ PreallocatedProcessManagerImpl::PreallocatedProcessReady() } -void -PreallocatedProcessManagerImpl::OnNuwaForkTimeout() -{ - if (!mNuwaForkWaitTasks.IsEmpty()) { - mNuwaForkWaitTasks.RemoveElementAt(0); - } - - // We haven't RecvAddNewProcess() after NuwaFork(). Maybe the main - // thread of the Nuwa process is in deadlock. - MOZ_ASSERT(false, "Can't fork from the nuwa process."); -} - void PreallocatedProcessManagerImpl::NuwaFork() { - CancelableTask* nuwaForkTimeoutTask = NewRunnableMethod( - this, &PreallocatedProcessManagerImpl::OnNuwaForkTimeout); - mNuwaForkWaitTasks.AppendElement(nuwaForkTimeoutTask); - - MessageLoop::current()->PostDelayedTask(FROM_HERE, - nuwaForkTimeoutTask, - NUWA_FORK_WAIT_DURATION_MS); mPreallocatedAppProcess->SendNuwaFork(); } #endif