Bug 505718 - 'mochitest-plain timeout (hanging?) during shutdown on Windows'. r+sr=jst.

This commit is contained in:
Ben Turner 2009-08-17 18:09:03 -07:00
parent 80119bbe6d
commit 120a432917
2 changed files with 3 additions and 3 deletions

View File

@ -558,7 +558,7 @@ DOMWorkerOperationCallback(JSContext* aCx)
// above in which case we shouldn't wait here. We're guaranteed not to race
// here because the pool reenters its monitor after canceling each worker
// in order to notify its condition variable.
if (!worker->IsCanceled()) {
if (worker->IsSuspended() && !worker->IsCanceled()) {
mon.Wait();
}
}

View File

@ -164,9 +164,9 @@ nsDOMWorkerPool::NoteDyingWorker(nsDOMWorker* aWorker)
void
nsDOMWorkerPool::GetWorkers(nsTArray<nsDOMWorker*>& aArray)
{
aArray.Clear();
PR_ASSERT_CURRENT_THREAD_IN_MONITOR(mMonitor);
NS_ASSERTION(!aArray.Length(), "Should be empty!");
nsAutoMonitor mon(mMonitor);
#ifdef DEBUG
nsDOMWorker** newWorkers =
#endif