Ignore:
Timestamp:
Oct 16, 2008, 4:11:24 AM (17 years ago)
Author:
[email protected]
Message:

2008-10-16 Maciej Stachowiak <[email protected]>

Reviewed by Cameron Zwarich.


  • fix for: REGRESSION: over 100 StructureIDs leak loading about:blank (result of fix for bug 21633)


Apparent slight progression (< 0.5%) on v8 benchmarks and SunSpider.

  • kjs/StructureID.cpp: (JSC::StructureID::~StructureID): Don't deref this object's parent's pointer to itself from the destructor; that doesn't even make sense. (JSC::StructureID::addPropertyTransition): Don't refer the single transition; the rule is that parent StructureIDs are ref'd but child ones are not. Refing the child creates a cycle.
File:
1 edited

Legend:

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

    r37630 r37632  
    109109    if (m_previous) {
    110110        if (m_previous->m_usingSingleTransitionSlot) {
    111             m_previous->m_transitions.singleTransition->deref();
    112111            m_previous->m_transitions.singleTransition = 0;
    113112        } else {
     
    120119        m_cachedPropertyNameArrayData->setCachedStructureID(0);
    121120
    122     if (m_usingSingleTransitionSlot) {
    123         if (m_transitions.singleTransition)
    124             m_transitions.singleTransition->deref();
    125     } else
     121    if (!m_usingSingleTransitionSlot)
    126122        delete m_transitions.table;
    127123
     
    266262        if (!structureID->m_transitions.singleTransition) {
    267263            structureID->m_transitions.singleTransition = transition.get();
    268             transition->ref();
    269264            return transition.release();
    270265        }
     
    275270        structureID->m_transitions.table = transitionTable;
    276271        transitionTable->add(make_pair(existingTransition->m_nameInPrevious, existingTransition->m_attributesInPrevious), existingTransition);
    277         existingTransition->deref();
    278272    }
    279273    structureID->m_transitions.table->add(make_pair(propertyName.ustring().rep(), attributes), transition.get());
Note: See TracChangeset for help on using the changeset viewer.