Changeset 12512 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jan 31, 2006, 10:24:32 PM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r12511 r12512 1 2006-01-31 Maciej Stachowiak <[email protected]> 2 3 Reviewed by Darin. 4 5 - fixed leak of hundreds of thousands of JS parser nodes on the layout tests, and added an exit counter 6 that would catch them 7 8 * kjs/nodes.cpp: 9 (NodeCounter::~NodeCounter): Added debug-only node counter. 10 (Node::Node): 11 (Node::~Node): 12 * kxmlcore/VectorTraits.h: Simple classes like RefPtr do in fact need destruction. 13 1 14 2006-01-31 Darin Adler <[email protected]> 2 15 -
trunk/JavaScriptCore/kjs/nodes.cpp
r12489 r12512 86 86 // ------------------------------ Node ----------------------------------------- 87 87 88 89 #ifndef NDEBUG 90 struct NodeCounter { 91 static int count; 92 ~NodeCounter() { if (count != 0) fprintf(stderr, "LEAK: %d KJS::Node\n", count); } 93 }; 94 int NodeCounter::count = 0; 95 static NodeCounter nodeImplCounter; 96 #endif NDEBUG 97 98 88 99 Node::Node() 89 100 { 101 #ifndef NDEBUG 102 ++NodeCounter::count; 103 #endif 90 104 line = Lexer::curr()->lineNo(); 91 105 sourceURL = Lexer::curr()->sourceURL(); … … 96 110 Node::~Node() 97 111 { 112 #ifndef NDEBUG 113 --NodeCounter::count; 114 #endif 98 115 } 99 116 -
trunk/JavaScriptCore/kxmlcore/VectorTraits.h
r12435 r12512 79 79 struct SimpleClassVectorTraits 80 80 { 81 static const bool needsDestruction = false;81 static const bool needsDestruction = true; 82 82 static const bool needsInitialization = true; 83 83 static const bool canInitializeWithMemset = true;
Note:
See TracChangeset
for help on using the changeset viewer.