Ignore:
Timestamp:
Jul 3, 2008, 12:44:43 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Geoff.

Don't create unnecessary JSGlobalData instances.

  • kjs/JSGlobalData.h:
  • kjs/JSGlobalData.cpp: (KJS::JSGlobalData::threadInstanceExists): (KJS::JSGlobalData::sharedInstanceExists): (KJS::JSGlobalData::threadInstance): (KJS::JSGlobalData::sharedInstance): (KJS::JSGlobalData::threadInstanceInternal): (KJS::JSGlobalData::sharedInstanceInternal): Added methods to query instance existence.
  • kjs/InitializeThreading.cpp: (KJS::initializeThreadingOnce): Initialize thread instance static in a new way.
  • API/JSBase.cpp: (JSGarbageCollect):
  • kjs/collector.cpp: (KJS::Heap::collect): Check for instance existence before accessing it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r34974 r34977  
    926926{
    927927#ifndef NDEBUG
    928     if (JSGlobalData::sharedInstance().heap == this) {
     928    if (JSGlobalData::sharedInstanceExists() && JSGlobalData::sharedInstance().heap == this) {
    929929        ASSERT(JSLock::lockCount() > 0);
    930930        ASSERT(JSLock::currentThreadIsHoldingLock());
Note: See TracChangeset for help on using the changeset viewer.