Ignore:
Timestamp:
Apr 22, 2010, 5:11:37 PM (15 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=38006
Change lifetime of JSC::IdentifierTables used by WebCores to match AtomicStringTable

Reviewed by Geoff Garen.

Presently JSC's IdentifierTables are owned by the JSGlobalData. For
JSGlobalData objects created via the API this should continue to be the case,
but for the JSGlobalData objects used by WebCore (the main thread's common
global data, and those for workers) use a IdentifierTable provided (and owned)
by wtfThreadData. This allow the lifetime of these IdentifierTable to match
those of the corresponding AtomicStringTables.

  • API/APIShims.h:

(JSC::APIEntryShim::APIEntryShim):

  • API/JSContextRef.cpp:

(JSContextGroupCreate):

  • runtime/Collector.cpp:

(JSC::Heap::protect):
(JSC::Heap::unprotect):
(JSC::Heap::markRoots):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
(JSC::JSGlobalData::createContextGroup):
(JSC::JSGlobalData::create):
(JSC::JSGlobalData::sharedInstance):

  • runtime/JSGlobalData.h:

(JSC::JSGlobalData::):
(JSC::JSGlobalData::isSharedInstance):

  • runtime/JSLock.cpp:

(JSC::JSLock::JSLock):
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::DropAllLocks::DropAllLocks):

  • wtf/WTFThreadData.cpp:

(WTF::WTFThreadData::WTFThreadData):
(WTF::WTFThreadData::~WTFThreadData):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r58012 r58133  
    973973{
    974974    ASSERT(k);
    975     ASSERT(JSLock::currentThreadIsHoldingLock() || !m_globalData->isSharedInstance);
     975//    ASSERT(JSLock::currentThreadIsHoldingLock() || !m_globalData->isSharedInstance());
    976976
    977977    if (!k.isCell())
     
    984984{
    985985    ASSERT(k);
    986     ASSERT(JSLock::currentThreadIsHoldingLock() || !m_globalData->isSharedInstance);
     986//    ASSERT(JSLock::currentThreadIsHoldingLock() || !m_globalData->isSharedInstance());
    987987
    988988    if (!k.isCell())
     
    10651065{
    10661066#ifndef NDEBUG
    1067     if (m_globalData->isSharedInstance) {
     1067    if (m_globalData->isSharedInstance()) {
    10681068        ASSERT(JSLock::lockCount() > 0);
    10691069        ASSERT(JSLock::currentThreadIsHoldingLock());
Note: See TracChangeset for help on using the changeset viewer.