Ignore:
Timestamp:
Jan 15, 2009, 4:53:41 PM (16 years ago)
Author:
[email protected]
Message:

2009-01-15 Sam Weinig <[email protected]>

Reviewed by Geoffrey Garen.

<rdar://problem/6045018>
REGRESSION (r34838): JavaScript objects appear to be leaked after loading google.com

Subtract the number of JSStrings cached in SmallStrings when calculating the
number of live JSObjects.

  • runtime/Collector.cpp: (JSC::Heap::objectCount):
  • runtime/SmallStrings.cpp: (JSC::SmallStrings::count):
  • runtime/SmallStrings.h:
File:
1 edited

Legend:

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

    r39815 r39956  
    100100    }
    101101}
    102    
     102
     103unsigned SmallStrings::count() const
     104{
     105    unsigned count = 0;
     106    if (m_emptyString)
     107        ++count;
     108    for (unsigned i = 0; i < numCharactersToStore; ++i) {
     109        if (m_singleCharacterStrings[i])
     110            ++count;
     111    }
     112    return count;
     113}
     114
    103115void SmallStrings::createEmptyString(JSGlobalData* globalData)
    104116{
Note: See TracChangeset for help on using the changeset viewer.