Changeset 37458 in webkit for trunk/JavaScriptCore/kjs/StructureID.cpp
- Timestamp:
- Oct 9, 2008, 6:21:09 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/StructureID.cpp
r37400 r37458 27 27 #include "StructureID.h" 28 28 29 #include "identifier.h"30 29 #include "JSObject.h" 31 30 #include "PropertyNameArray.h" 31 #include "identifier.h" 32 32 #include "lookup.h" 33 #include <wtf/RefCountedLeakCounter.h> 33 34 #include <wtf/RefPtr.h> 34 35 … … 36 37 37 38 namespace JSC { 39 40 #ifndef NDEBUG 41 static WTF::RefCountedLeakCounter structureIDCounter("StructureID"); 42 #endif 38 43 39 44 StructureID::StructureID(JSValue* prototype, const TypeInfo& typeInfo) … … 51 56 ASSERT(m_prototype); 52 57 ASSERT(m_prototype->isObject() || m_prototype->isNull()); 58 59 #ifndef NDEBUG 60 structureIDCounter.increment(); 61 #endif 62 } 63 64 StructureID::~StructureID() 65 { 66 if (m_previous) { 67 ASSERT(m_previous->m_transitionTable.contains(make_pair(m_nameInPrevious, m_attributesInPrevious))); 68 m_previous->m_transitionTable.remove(make_pair(m_nameInPrevious, m_attributesInPrevious)); 69 } 70 71 if (m_cachedPropertyNameArrayData) 72 m_cachedPropertyNameArrayData->setCachedStructureID(0); 73 74 #ifndef NDEBUG 75 structureIDCounter.decrement(); 76 #endif 53 77 } 54 78 … … 195 219 } 196 220 197 StructureID::~StructureID()198 {199 if (m_previous) {200 ASSERT(m_previous->m_transitionTable.contains(make_pair(m_nameInPrevious, m_attributesInPrevious)));201 m_previous->m_transitionTable.remove(make_pair(m_nameInPrevious, m_attributesInPrevious));202 }203 204 if (m_cachedPropertyNameArrayData)205 m_cachedPropertyNameArrayData->setCachedStructureID(0);206 }207 208 221 StructureIDChain* StructureID::createCachedPrototypeChain() 209 222 {
Note:
See TracChangeset
for help on using the changeset viewer.