Ignore:
Timestamp:
Jan 11, 2007, 10:25:15 PM (18 years ago)
Author:
ggaren
Message:

RS by Brady Eidson.


Rolling out r18786 because it caused leaks.

File:
1 edited

Legend:

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

    r18786 r18795  
    418418}
    419419
    420 typedef HashCountedSet<JSCell*> ProtectCountSet;
    421 
    422 static ProtectCountSet& protectedValues()
    423 {
    424     static ProtectCountSet staticProtectCountSet;
    425     return staticProtectCountSet;
     420typedef HashCountedSet<JSCell *> ProtectCounts;
     421
     422static ProtectCounts& protectedValues()
     423{
     424    static ProtectCounts pv;
     425    return pv;
    426426}
    427427
     
    450450void Collector::markProtectedObjects()
    451451{
    452   ProtectCountSet& protectedValues = KJS::protectedValues();
    453   ProtectCountSet::iterator end = protectedValues.end();
    454   for (ProtectCountSet::iterator it = protectedValues.begin(); it != end; ++it) {
     452  ProtectCounts& pv = protectedValues();
     453  ProtectCounts::iterator end = pv.end();
     454  for (ProtectCounts::iterator it = pv.begin(); it != end; ++it) {
    455455    JSCell *val = it->first;
    456456    if (!val->marked())
     
    670670    HashCountedSet<const char*>* counts = new HashCountedSet<const char*>;
    671671
    672     ProtectCountSet& protectedValues = KJS::protectedValues();
    673     ProtectCountSet::iterator end = protectedValues.end();
    674     for (ProtectCountSet::iterator it = protectedValues.begin(); it != end; ++it)
     672    ProtectCounts& pv = protectedValues();
     673    ProtectCounts::iterator end = pv.end();
     674    for (ProtectCounts::iterator it = pv.begin(); it != end; ++it)
    675675        counts->add(typeName(it->first));
    676676
Note: See TracChangeset for help on using the changeset viewer.