diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-22 15:40:17 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-22 15:40:17 +0200 |
commit | 43a42f108af6bcbd91f2672731c3047c26213af1 (patch) | |
tree | 7fa092e5f5d873c72f2486a70e26be26f7a38bec /Source/JavaScriptCore/heap/GCThread.cpp | |
parent | d9cf437c840c6eb7417bdd97e6c40979255d3158 (diff) | |
download | qtwebkit-43a42f108af6bcbd91f2672731c3047c26213af1.tar.gz |
Imported WebKit commit 302e7806bff028bd1167a1ec7c86a1ee00ecfb49 (http://svn.webkit.org/repository/webkit/trunk@132067)
New snapshot that fixes build without QtWidgets
Diffstat (limited to 'Source/JavaScriptCore/heap/GCThread.cpp')
-rw-r--r-- | Source/JavaScriptCore/heap/GCThread.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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); |