Changeset 126379 in webkit


Ignore:
Timestamp:
Aug 22, 2012, 6:33:25 PM (13 years ago)
Author:
ggaren@apple.com
Message:

ThreadRestrictionVerifier should be opt-in, not opt-out
https://bugs.webkit.org/show_bug.cgi?id=94761

Reviewed by Mark Hahnenberg.

../JavaScriptCore:

Removed explicit calls to disable the verifier, since it's off by default now.

  • parser/SourceProvider.h:

(JSC::SourceProvider::SourceProvider):
(SourceProvider):

  • runtime/SymbolTable.h:

(JSC::SharedSymbolTable::SharedSymbolTable):

../WTF:

WebKit's JavaScript engine supports use on multiple threads, so default-on
is not appropriate for most of our objects, and it causes lots of suprious
assertions.

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocatorHandle::MetaAllocatorHandle): No need to turn off
explicitly, since it's off by default now.

  • wtf/ThreadRestrictionVerifier.h:

(WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier): Turn off by default.

(WTF::ThreadRestrictionVerifier::setMutexMode):
(WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
(WTF::ThreadRestrictionVerifier::turnOffVerification): These assertions
about state transitions were inconsistent with each other, and impossible
to maintain with default off, so I removed them.

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r126354 r126379  
     12012-08-22  Geoffrey Garen  <ggaren@apple.com>
     2
     3        ThreadRestrictionVerifier should be opt-in, not opt-out
     4        https://bugs.webkit.org/show_bug.cgi?id=94761
     5
     6        Reviewed by Mark Hahnenberg.
     7
     8        Removed explicit calls to disable the verifier, since it's off by default now.
     9
     10        * parser/SourceProvider.h:
     11        (JSC::SourceProvider::SourceProvider):
     12        (SourceProvider):
     13        * runtime/SymbolTable.h:
     14        (JSC::SharedSymbolTable::SharedSymbolTable):
     15
    1162012-08-22  Mark Hahnenberg  <mhahnenberg@apple.com>
    217
  • trunk/Source/JavaScriptCore/parser/SourceProvider.h

    r118966 r126379  
    5050            , m_cacheOwned(!cache)
    5151        {
    52             turnOffVerifier();
    5352        }
     53
    5454        virtual ~SourceProvider()
    5555        {
  • trunk/Source/JavaScriptCore/runtime/SymbolTable.h

    r120244 r126379  
    331331        static PassRefPtr<SharedSymbolTable> create() { return adoptRef(new SharedSymbolTable); }
    332332    private:
    333         SharedSymbolTable() { turnOffVerifier(); }
     333        SharedSymbolTable() { }
    334334    };
    335335   
  • trunk/Source/WTF/ChangeLog

    r126291 r126379  
     12012-08-22  Geoffrey Garen  <ggaren@apple.com>
     2
     3        ThreadRestrictionVerifier should be opt-in, not opt-out
     4        https://bugs.webkit.org/show_bug.cgi?id=94761
     5
     6        Reviewed by Mark Hahnenberg.
     7
     8        WebKit's JavaScript engine supports use on multiple threads, so default-on
     9        is not appropriate for most of our objects, and it causes lots of suprious
     10        assertions.
     11
     12        * wtf/MetaAllocator.cpp:
     13        (WTF::MetaAllocatorHandle::MetaAllocatorHandle): No need to turn off
     14        explicitly, since it's off by default now.
     15
     16        * wtf/ThreadRestrictionVerifier.h:
     17        (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier): Turn off by default.
     18
     19        (WTF::ThreadRestrictionVerifier::setMutexMode):
     20        (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
     21        (WTF::ThreadRestrictionVerifier::turnOffVerification): These assertions
     22        about state transitions were inconsistent with each other, and impossible
     23        to maintain with default off, so I removed them.
     24
    1252012-08-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
    226
  • trunk/Source/WTF/wtf/MetaAllocator.cpp

    r116583 r126379  
    8080    ASSERT(start);
    8181    ASSERT(sizeInBytes);
    82     turnOffVerifier();
    8382}
    8483
  • trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h

    r111778 r126379  
    5151public:
    5252    ThreadRestrictionVerifier()
     53#if USE(JSC)
     54        : m_mode(NoVerificationMode)
     55#else
    5356        : m_mode(SingleThreadVerificationMode)
     57#endif
    5458        , m_shared(false)
    5559        , m_owningThread(0)
     
    7175    void setMutexMode(Mutex& mutex)
    7276    {
    73         ASSERT(m_mode == SingleThreadVerificationMode || (m_mode == MutexVerificationMode && &mutex == m_mutex));
    7477        m_mode = MutexVerificationMode;
    7578        m_mutex = &mutex;
     
    7982    void setDispatchQueueMode(dispatch_queue_t queue)
    8083    {
    81         ASSERT(m_mode == SingleThreadVerificationMode);
    8284        m_mode = SingleDispatchQueueVerificationMode;
    8385        m_owningQueue = queue;
     
    8890    void turnOffVerification()
    8991    {
    90         ASSERT(m_mode == SingleThreadVerificationMode);
    9192        m_mode = NoVerificationMode;
    9293    }
Note: See TracChangeset for help on using the changeset viewer.