Ignore:
Timestamp:
Sep 15, 2012, 11:08:18 PM (13 years ago)
Author:
[email protected]
Message:

Fixed JSLock to use the platform abstraction for Mutex instead of
depending on pthreads.
https://bugs.webkit.org/show_bug.cgi?id=96858.

Reviewed by Filip Pizlo.

This fixes a synchronization problem on the Windows port and makes
it more reliable when running the layout tests.

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreadingOnce):

  • runtime/JSLock.cpp:

(JSC):
(JSC::GlobalJSLock::GlobalJSLock):
(JSC::GlobalJSLock::~GlobalJSLock):
(JSC::GlobalJSLock::initialize):

  • runtime/JSLock.h:

(GlobalJSLock):
(JSLock):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSLock.h

    r121381 r128704  
    5959        JS_EXPORT_PRIVATE GlobalJSLock();
    6060        JS_EXPORT_PRIVATE ~GlobalJSLock();
     61
     62        static void initialize();
     63    private:
     64        static Mutex* s_sharedInstanceLock;
    6165    };
    6266
     
    9296        void grabAllLocks(unsigned lockCount);
    9397
    94         SpinLock m_spinLock;
    95         Mutex m_lock;
    96         ThreadIdentifier m_ownerThread;
    97         intptr_t m_lockCount;
    98         unsigned m_lockDropDepth;
    99 
    10098        class DropAllLocks {
    10199            WTF_MAKE_NONCOPYABLE(DropAllLocks);
     
    109107            RefPtr<JSGlobalData> m_globalData;
    110108        };
     109
     110    private:
     111        SpinLock m_spinLock;
     112        Mutex m_lock;
     113        ThreadIdentifier m_ownerThread;
     114        intptr_t m_lockCount;
     115        unsigned m_lockDropDepth;
    111116    };
    112117
Note: See TracChangeset for help on using the changeset viewer.