From 43a42f108af6bcbd91f2672731c3047c26213af1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 22 Oct 2012 15:40:17 +0200 Subject: Imported WebKit commit 302e7806bff028bd1167a1ec7c86a1ee00ecfb49 (http://svn.webkit.org/repository/webkit/trunk@132067) New snapshot that fixes build without QtWidgets --- Source/JavaScriptCore/heap/GCThread.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Source/JavaScriptCore/heap/GCThread.cpp') diff --git a/Source/JavaScriptCore/heap/GCThread.cpp b/Source/JavaScriptCore/heap/GCThread.cpp index ea43456bd..ce3bbedc9 100644 --- a/Source/JavaScriptCore/heap/GCThread.cpp +++ b/Source/JavaScriptCore/heap/GCThread.cpp @@ -70,8 +70,16 @@ CopyVisitor* GCThread::copyVisitor() GCPhase GCThread::waitForNextPhase() { MutexLocker locker(m_shared.m_phaseLock); + while (m_shared.m_gcThreadsShouldWait) + m_shared.m_phaseCondition.wait(m_shared.m_phaseLock); + + m_shared.m_numberOfActiveGCThreads--; + if (!m_shared.m_numberOfActiveGCThreads) + m_shared.m_activityCondition.signal(); + while (m_shared.m_currentPhase == NoPhase) m_shared.m_phaseCondition.wait(m_shared.m_phaseLock); + m_shared.m_numberOfActiveGCThreads++; return m_shared.m_currentPhase; } @@ -84,7 +92,7 @@ void GCThread::gcThreadMain() // Wait for the main thread to finish creating and initializing us. The main thread grabs this lock before // creating this thread. We aren't guaranteed to have a valid threadID until the main thread releases this lock. { - MutexLocker locker(m_shared.m_markingLock); + MutexLocker locker(m_shared.m_phaseLock); } { ParallelModeEnabler enabler(*m_slotVisitor); -- cgit v1.2.1