Changeset 37563 in webkit for trunk/JavaScriptCore/kjs/StructureID.cpp
- Timestamp:
- Oct 13, 2008, 2:41:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/StructureID.cpp
r37508 r37563 40 40 #ifndef NDEBUG 41 41 static WTF::RefCountedLeakCounter structureIDCounter("StructureID"); 42 43 static bool shouldIgnoreLeaks; 44 static HashSet<StructureID*> ignoreSet; 42 45 #endif 43 46 … … 58 61 59 62 #ifndef NDEBUG 60 structureIDCounter.increment(); 63 if (shouldIgnoreLeaks) 64 ignoreSet.add(this); 65 else 66 structureIDCounter.increment(); 61 67 #endif 62 68 } … … 73 79 74 80 #ifndef NDEBUG 75 structureIDCounter.decrement(); 81 HashSet<StructureID*>::iterator it = ignoreSet.find(this); 82 if (it != ignoreSet.end()) 83 ignoreSet.remove(it); 84 else 85 structureIDCounter.decrement(); 86 #endif 87 } 88 89 void StructureID::startIgnoringLeaks() 90 { 91 #ifndef NDEBUG 92 shouldIgnoreLeaks = true; 93 #endif 94 } 95 96 void StructureID::stopIgnoringLeaks() 97 { 98 #ifndef NDEBUG 99 shouldIgnoreLeaks = false; 76 100 #endif 77 101 }
Note:
See TracChangeset
for help on using the changeset viewer.