Ignore:
Timestamp:
Aug 14, 2015, 9:53:37 AM (10 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r188444.
https://bugs.webkit.org/show_bug.cgi?id=148029

Broke GTK and EFL (see bug #148027) (Requested by philn on
#webkit).

Reverted changeset:

"Use WTF::Lock and WTF::Condition instead of WTF::Mutex,
WTF::ThreadCondition, std::mutex, and std::condition_variable"
https://bugs.webkit.org/show_bug.cgi?id=147999
http://trac.webkit.org/changeset/188444

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/disassembler/Disassembler.cpp

    r188444 r188475  
    2828
    2929#include "MacroAssemblerCodeRef.h"
    30 #include <wtf/Condition.h>
    3130#include <wtf/DataLog.h>
    3231#include <wtf/Deque.h>
    33 #include <wtf/Lock.h>
    3432#include <wtf/NeverDestroyed.h>
    3533#include <wtf/StringPrintStream.h>
    3634#include <wtf/Threading.h>
     35#include <wtf/ThreadingPrimitives.h>
    3736
    3837namespace JSC {
     
    8079    void enqueue(std::unique_ptr<DisassemblyTask> task)
    8180    {
    82         LockHolder locker(m_lock);
     81        MutexLocker locker(m_lock);
    8382        m_queue.append(WTF::move(task));
    84         m_condition.notifyAll();
     83        m_condition.broadcast();
    8584    }
    8685   
    8786    void waitUntilEmpty()
    8887    {
    89         LockHolder locker(m_lock);
     88        MutexLocker locker(m_lock);
    9089        while (!m_queue.isEmpty() || m_working)
    9190            m_condition.wait(m_lock);
     
    9897            std::unique_ptr<DisassemblyTask> task;
    9998            {
    100                 LockHolder locker(m_lock);
     99                MutexLocker locker(m_lock);
    101100                m_working = false;
    102                 m_condition.notifyAll();
     101                m_condition.broadcast();
    103102                while (m_queue.isEmpty())
    104103                    m_condition.wait(m_lock);
     
    114113    }
    115114   
    116     Lock m_lock;
    117     Condition m_condition;
     115    Mutex m_lock;
     116    ThreadCondition m_condition;
    118117    Deque<std::unique_ptr<DisassemblyTask>> m_queue;
    119118    bool m_working { false };
Note: See TracChangeset for help on using the changeset viewer.