Changeset 58133 in webkit for trunk/JavaScriptCore/API/APIShims.h


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/API/APIShims.h

    r57879 r58133  
    6767    APIEntryShim(JSGlobalData* globalData, bool registerThread = true)
    6868        : APIEntryShimWithoutLock(globalData, registerThread)
    69         , m_lock(globalData->isSharedInstance ? LockForReal : SilenceAssertionsOnly)
     69        , m_lock(globalData->isSharedInstance() ? LockForReal : SilenceAssertionsOnly)
    7070    {
    7171    }
Note: See TracChangeset for help on using the changeset viewer.