Changeset 53899 in webkit
- Timestamp:
- Jan 26, 2010 9:57:34 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r53891 r53899 1 2010-01-26 Alexey Proskuryakov <ap@apple.com> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=34150 6 WebKit needs a mechanism to catch stale HashMap entries 7 8 It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash 9 is just its value, it is very unlikely that any observable problem is reproducible. 10 11 This extends hash table consistency checks to check that pointers are referencing allocated 12 memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible 13 to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much). 14 15 * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can 16 add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems 17 with those yet. 18 19 * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by 20 CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency(). 21 22 * wtf/HashTable.h: 23 (WTF::HashTable::internalCheckTableConsistency): 24 (WTF::HashTable::internalCheckTableConsistencyExceptSize): 25 (WTF::HashTable::checkTableConsistencyExceptSize): 26 Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off. 27 (WTF::::add): Updated for checkTableConsistency renaming. 28 (WTF::::addPassingHashCode): Ditto. 29 (WTF::::removeAndInvalidate): Ditto. 30 (WTF::::remove): Ditto. 31 (WTF::::rehash): Ditto. 32 (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this 33 function returns true for tables with m_table == 0. 34 (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially, 35 we could do the same for values. 36 37 * wtf/HashTraits.h: 38 (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden 39 to add checks. Currently, the only override is for pointer hashes. 40 41 * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming. 42 1 43 2010-01-26 Lyon Chen <liachen@rim.com> 2 44 -
trunk/JavaScriptCore/wtf/HashMap.h
r51566 r53899 101 101 template<typename T, typename HashTranslator> pair<iterator, bool> add(const T&, const MappedType&); 102 102 103 void checkConsistency() const; 104 103 105 private: 104 106 pair<iterator, bool> inlineAdd(const KeyType&, const MappedType&); … … 282 284 if (it.m_impl == m_impl.end()) 283 285 return; 284 m_impl. checkTableConsistency();286 m_impl.internalCheckTableConsistency(); 285 287 m_impl.removeWithoutEntryConsistencyCheck(it.m_impl); 286 288 } … … 310 312 return result; 311 313 } 314 315 template<typename T, typename U, typename V, typename W, typename X> 316 inline void HashMap<T, U, V, W, X>::checkConsistency() const 317 { 318 m_impl.checkTableConsistency(); 319 } 320 312 321 313 322 template<typename T, typename U, typename V, typename W, typename X> -
trunk/JavaScriptCore/wtf/HashSet.h
r51566 r53899 225 225 if (it.m_impl == m_impl.end()) 226 226 return; 227 m_impl. checkTableConsistency();227 m_impl.internalCheckTableConsistency(); 228 228 m_impl.removeWithoutEntryConsistencyCheck(it.m_impl); 229 229 } -
trunk/JavaScriptCore/wtf/HashTable.h
r53151 r53899 31 31 32 32 #define DUMP_HASHTABLE_STATS 0 33 // Enables internal WTF consistency checks that are invoked automatically. Non-WTF callers can call checkTableConsistency() even if internal checks are disabled. 33 34 #define CHECK_HASHTABLE_CONSISTENCY 0 34 35 … … 341 342 template<typename T, typename HashTranslator> ValueType* lookup(const T&); 342 343 343 #if CHECK_HASHTABLE_CONSISTENCY344 #if !ASSERT_DISABLED 344 345 void checkTableConsistency() const; 345 346 #else 346 347 static void checkTableConsistency() { } 348 #endif 349 #if CHECK_HASHTABLE_CONSISTENCY 350 void internalCheckTableConsistency() const { checkTableConsistency(); } 351 void internalCheckTableConsistencyExceptSize() const { checkTableConsistencyExceptSize(); } 352 #else 353 static void internalCheckTableConsistencyExceptSize() { } 354 static void internalCheckTableConsistency() { } 347 355 #endif 348 356 … … 384 392 const_iterator makeKnownGoodConstIterator(ValueType* pos) const { return const_iterator(this, pos, m_table + m_tableSize, HashItemKnownGood); } 385 393 386 #if CHECK_HASHTABLE_CONSISTENCY394 #if !ASSERT_DISABLED 387 395 void checkTableConsistencyExceptSize() const; 388 396 #else 389 static void checkTableConsistencyExceptSize() { }397 static void checkTableConsistencyExceptSize() const { } 390 398 #endif 391 399 … … 625 633 expand(); 626 634 627 checkTableConsistency();635 internalCheckTableConsistency(); 628 636 629 637 ASSERT(m_table); … … 694 702 } 695 703 696 checkTableConsistency();704 internalCheckTableConsistency(); 697 705 698 706 return std::make_pair(makeKnownGoodIterator(entry), true); … … 710 718 expand(); 711 719 712 checkTableConsistency();720 internalCheckTableConsistency(); 713 721 714 722 FullLookupType lookupResult = fullLookupForWriting<T, HashTranslator>(key); … … 739 747 } 740 748 741 checkTableConsistency();749 internalCheckTableConsistency(); 742 750 743 751 return std::make_pair(makeKnownGoodIterator(entry), true); … … 806 814 { 807 815 invalidateIterators(); 808 checkTableConsistency();816 internalCheckTableConsistency(); 809 817 remove(pos); 810 818 } … … 824 832 shrink(); 825 833 826 checkTableConsistency();834 internalCheckTableConsistency(); 827 835 } 828 836 … … 893 901 void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::rehash(int newTableSize) 894 902 { 895 checkTableConsistencyExceptSize();903 internalCheckTableConsistencyExceptSize(); 896 904 897 905 int oldTableSize = m_tableSize; … … 915 923 deallocateTable(oldTable, oldTableSize); 916 924 917 checkTableConsistency();925 internalCheckTableConsistency(); 918 926 } 919 927 … … 982 990 } 983 991 984 #if CHECK_HASHTABLE_CONSISTENCY992 #if !ASSERT_DISABLED 985 993 986 994 template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits> … … 988 996 { 989 997 checkTableConsistencyExceptSize(); 990 ASSERT(! shouldExpand());998 ASSERT(!m_table || !shouldExpand()); 991 999 ASSERT(!shouldShrink()); 992 1000 } … … 1013 1021 ASSERT(entry == it.m_position); 1014 1022 ++count; 1023 1024 KeyTraits::checkValueConsistency(it->first); 1015 1025 } 1016 1026 … … 1022 1032 } 1023 1033 1024 #endif // CHECK_HASHTABLE_CONSISTENCY1034 #endif // ASSERT_DISABLED 1025 1035 1026 1036 #if CHECK_HASHTABLE_ITERATORS -
trunk/JavaScriptCore/wtf/HashTraits.h
r40678 r53899 27 27 #include <limits> 28 28 29 #if OS(DARWIN) 30 #include <malloc/malloc.h> 31 #endif 32 29 33 namespace WTF { 30 34 … … 52 56 typedef T TraitType; 53 57 static T emptyValue() { return T(); } 58 static void checkValueConsistency(const T&) { } 54 59 }; 55 60 … … 80 85 static void constructDeletedValue(P*& slot) { slot = reinterpret_cast<P*>(-1); } 81 86 static bool isDeletedValue(P* value) { return value == reinterpret_cast<P*>(-1); } 87 #if !ASSERT_DISABLED 88 static void checkValueConsistency(const P* p) 89 { 90 #if (defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) || !defined(NDEBUG) 91 #if OS(DARWIN) 92 ASSERT(malloc_size(p)); 93 #elif COMPILER(MSVC) 94 ASSERT(_msize(p)); 95 #endif 96 #endif 97 HashTraits<P>::checkValueConsistency(*p); 98 } 99 #endif 82 100 }; 83 101 -
trunk/JavaScriptCore/wtf/RefPtrHashMap.h
r46675 r53899 286 286 if (it.m_impl == m_impl.end()) 287 287 return; 288 m_impl. checkTableConsistency();288 m_impl.internalCheckTableConsistency(); 289 289 m_impl.removeWithoutEntryConsistencyCheck(it.m_impl); 290 290 } -
trunk/WebCore/ChangeLog
r53897 r53899 1 2010-01-26 Alexey Proskuryakov <ap@apple.com> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=34150 6 WebKit needs a mechanism to catch stale HashMap entries 7 8 * WebCore.xcodeproj/project.pbxproj: Added ContainerNodeAlgorithms.h to the project to make 9 it easier to search for. 10 11 * css/CSSStyleSelector.cpp: 12 (WebCore::CSSRuleSet::getIDRules): 13 (WebCore::CSSRuleSet::getClassRules): 14 (WebCore::CSSRuleSet::getTagRules): 15 (WebCore::CSSStyleSelector::keyframeStylesForAnimation): 16 * dom/CheckedRadioButtons.cpp: 17 (WebCore::CheckedRadioButtons::checkedButtonForGroup): 18 (WebCore::CheckedRadioButtons::removeButton): 19 * dom/Document.cpp: 20 (WebCore::Document::getElementById): 21 (WebCore::Document::removeElementById): 22 (WebCore::Document::removeImageMap): 23 (WebCore::Document::getImageMap): 24 (WebCore::Document::nameCollectionInfo): 25 * dom/Document.h: 26 (WebCore::Document::collectionInfo): 27 * editing/markup.cpp: 28 (WebCore::shouldAddNamespaceAttr): 29 (WebCore::appendNamespace): 30 (WebCore::appendStartMarkup): 31 * html/HTMLCollection.cpp: 32 (WebCore::HTMLCollection::namedItems): 33 (WebCore::HTMLCollection::nextNamedItem): 34 * html/HTMLFormCollection.cpp: 35 (WebCore::HTMLFormCollection::formCollectionInfo): 36 * html/HTMLSelectElement.h: 37 (WebCore::HTMLSelectElement::collectionInfo): 38 * loader/loader.cpp: 39 (WebCore::Loader::load): 40 (WebCore::Loader::servePendingRequests): 41 (WebCore::Loader::nonCacheRequestInFlight): 42 (WebCore::Loader::nonCacheRequestComplete): 43 (WebCore::Loader::cancelRequests): 44 * page/animation/CompositeAnimation.cpp: 45 (WebCore::CompositeAnimation::clearRenderer): 46 (WebCore::CompositeAnimation::updateKeyframeAnimations): 47 (WebCore::CompositeAnimation::animate): 48 (WebCore::CompositeAnimation::getAnimatedStyle): 49 (WebCore::CompositeAnimation::setAnimating): 50 (WebCore::CompositeAnimation::timeToNextService): 51 (WebCore::CompositeAnimation::getAnimationForProperty): 52 (WebCore::CompositeAnimation::suspendAnimations): 53 (WebCore::CompositeAnimation::resumeAnimations): 54 (WebCore::CompositeAnimation::isAnimatingProperty): 55 (WebCore::CompositeAnimation::pauseAnimationAtTime): 56 (WebCore::CompositeAnimation::numberOfActiveAnimations): 57 Added checkConsistency checks before lookups in HashMaps with AtomicStringImpl* keys. 58 59 * dom/ContainerNodeAlgorithms.h: (WebCore::removeAllChildrenInContainer): Be sure to notify 60 about removed child nodes that can be deleted immediately. 61 62 * html/CollectionCache.cpp: 63 (WebCore::CollectionCache::checkConsistency): 64 * html/CollectionCache.h: 65 Added a checkConsistency() method that checks both HashMaps in the cache. 66 67 * platform/TreeShared.h: 68 (WebCore::TreeShared::~TreeShared): Assert that m_refCount is null. Since Nodes can be 69 destroyed with operator delete (as done in ContainerNodeAlgorithms), this is important to check. 70 (WebCore::TreeShared::deref): Assert that m_refCount isn't already negative. 71 1 72 2010-01-26 Daniel Bates <dbates@webkit.org> 2 73 -
trunk/WebCore/css/CSSStyleSelector.cpp
r53878 r53899 362 362 CSSStyleRule* rule, CSSSelector* sel); 363 363 364 CSSRuleDataList* getIDRules(AtomicStringImpl* key) { return m_idRules.get(key); }365 CSSRuleDataList* getClassRules(AtomicStringImpl* key) { return m_classRules.get(key); }366 CSSRuleDataList* getTagRules(AtomicStringImpl* key) { return m_tagRules.get(key); }364 CSSRuleDataList* getIDRules(AtomicStringImpl* key) { m_idRules.checkConsistency(); return m_idRules.get(key); } 365 CSSRuleDataList* getClassRules(AtomicStringImpl* key) { m_classRules.checkConsistency(); return m_classRules.get(key); } 366 CSSRuleDataList* getTagRules(AtomicStringImpl* key) { m_tagRules.checkConsistency(); return m_tagRules.get(key); } 367 367 CSSRuleDataList* getUniversalRules() { return m_universalRules; } 368 368 … … 1302 1302 if (!e || list.animationName().isEmpty()) 1303 1303 return; 1304 1304 1305 m_keyframesRuleMap.checkConsistency(); 1306 1305 1307 if (!m_keyframesRuleMap.contains(list.animationName().impl())) 1306 1308 return; -
trunk/WebCore/dom/CheckedRadioButtons.cpp
r42084 r53899 61 61 if (!m_nameToCheckedRadioButtonMap) 62 62 return 0; 63 64 m_nameToCheckedRadioButtonMap->checkConsistency(); 63 65 64 66 return m_nameToCheckedRadioButtonMap->get(name.impl()); … … 70 72 return; 71 73 74 m_nameToCheckedRadioButtonMap->checkConsistency(); 75 72 76 NameToInputMap::iterator it = m_nameToCheckedRadioButtonMap->find(element->name().impl()); 73 77 if (it == m_nameToCheckedRadioButtonMap->end() || it->second != element) -
trunk/WebCore/dom/ContainerNodeAlgorithms.h
r36866 r53899 34 34 void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer* container); 35 35 36 template<class GenericNode, bool dispatchRemovalNotification> 37 struct NodeRemovalDispatcher; 38 39 template<class GenericNode> 40 struct ShouldDispatchRemovalNotification; 41 36 42 }; 37 43 … … 62 68 Private::addChildNodesToDeletionQueue<GenericNode, GenericNodeContainer>(head, tail, static_cast<GenericNodeContainer*>(n)); 63 69 70 Private::NodeRemovalDispatcher<GenericNode, Private::ShouldDispatchRemovalNotification<GenericNode>::value>::dispatch(n); 64 71 delete n; 65 72 } -
trunk/WebCore/dom/Document.cpp
r53878 r53899 885 885 return 0; 886 886 887 m_elementsById.checkConsistency(); 888 887 889 Element* element = m_elementsById.get(elementId.impl()); 888 890 if (element) … … 1076 1078 void Document::removeElementById(const AtomicString& elementId, Element* element) 1077 1079 { 1080 m_elementsById.checkConsistency(); 1081 1078 1082 if (m_elementsById.get(elementId.impl()) == element) 1079 1083 m_elementsById.remove(elementId.impl()); … … 3358 3362 return; 3359 3363 3364 m_imageMapsByName.checkConsistency(); 3365 3360 3366 ImageMapsByName::iterator it = m_imageMapsByName.find(name.impl()); 3361 3367 if (it != m_imageMapsByName.end() && it->second == imageMap) … … 3370 3376 String name = (hashPos < 0 ? url : url.substring(hashPos + 1)).impl(); 3371 3377 AtomicString mapName = isHTMLDocument() ? name.lower() : name; 3378 m_imageMapsByName.checkConsistency(); 3372 3379 return m_imageMapsByName.get(mapName.impl()); 3373 3380 } … … 4175 4182 if (iter == map.end()) 4176 4183 iter = map.add(name.impl(), new CollectionCache).first; 4184 iter->second->checkConsistency(); 4177 4185 return iter->second; 4178 4186 } -
trunk/WebCore/dom/Document.h
r53878 r53899 350 350 unsigned index = type - FirstUnnamedDocumentCachedType; 351 351 ASSERT(index < NumUnnamedDocumentCachedTypes); 352 m_collectionInfo[index].checkConsistency(); 352 353 return &m_collectionInfo[index]; 353 354 } -
trunk/WebCore/editing/markup.cpp
r53442 r53899 316 316 static bool shouldAddNamespaceAttr(const Attribute* attr, HashMap<AtomicStringImpl*, AtomicStringImpl*>& namespaces) 317 317 { 318 namespaces.checkConsistency(); 319 318 320 // Don't add namespace attributes twice 319 321 if (attr->name() == XMLNSNames::xmlnsAttr) { … … 333 335 static void appendNamespace(Vector<UChar>& result, const AtomicString& prefix, const AtomicString& ns, HashMap<AtomicStringImpl*, AtomicStringImpl*>& namespaces) 334 336 { 337 namespaces.checkConsistency(); 335 338 if (ns.isEmpty()) 336 339 return; … … 393 396 static void appendStartMarkup(Vector<UChar>& result, const Node* node, const Range* range, EAnnotateForInterchange annotate, bool convertBlocksToInlines = false, HashMap<AtomicStringImpl*, AtomicStringImpl*>* namespaces = 0, RangeFullySelectsNode rangeFullySelectsNode = DoesFullySelectNode) 394 397 { 398 if (namespaces) 399 namespaces->checkConsistency(); 400 395 401 bool documentIsHTML = node->document()->isHTMLDocument(); 396 402 switch (node->nodeType()) { -
trunk/WebCore/html/CollectionCache.cpp
r43187 r53899 86 86 } 87 87 88 #if !ASSERT_DISABLED 89 void CollectionCache::checkConsistency() 90 { 91 idCache.checkConsistency(); 92 nameCache.checkConsistency(); 93 } 94 #endif 95 88 96 } // namespace WebCore -
trunk/WebCore/html/CollectionCache.h
r51693 r53899 44 44 void swap(CollectionCache&); 45 45 46 void checkConsistency(); 47 46 48 typedef HashMap<AtomicStringImpl*, Vector<Element*>*> NodeCacheMap; 47 49 … … 60 62 }; 61 63 64 #if ASSERT_DISABLED 65 inline void CollectionCache::checkConsistency() { } 66 #endif 67 62 68 } // namespace 63 69 -
trunk/WebCore/html/HTMLCollection.cpp
r52312 r53899 359 359 resetCollectionInfo(); 360 360 updateNameCache(); 361 361 m_info->checkConsistency(); 362 362 363 Vector<Element*>* idResults = m_info->idCache.get(name.impl()); 363 364 Vector<Element*>* nameResults = m_info->nameCache.get(name.impl()); … … 374 375 { 375 376 resetCollectionInfo(); 377 m_info->checkConsistency(); 376 378 377 379 for (Element* e = itemAfter(m_info->current); e; e = itemAfter(e)) { -
trunk/WebCore/html/HTMLFormCollection.cpp
r52312 r53899 41 41 if (!form->collectionInfo) 42 42 form->collectionInfo = new CollectionCache; 43 form->collectionInfo->checkConsistency(); 43 44 return form->collectionInfo; 44 45 } -
trunk/WebCore/html/HTMLSelectElement.h
r53761 r53899 77 77 Node* item(unsigned index); 78 78 79 CollectionCache* collectionInfo() { return &m_collectionInfo; }79 CollectionCache* collectionInfo() { m_collectionInfo.checkConsistency(); return &m_collectionInfo; } 80 80 81 81 void scrollToSelection(); -
trunk/WebCore/loader/loader.cpp
r52456 r53899 126 126 KURL url(ParsedURLString, resource->url()); 127 127 if (url.protocolInHTTPFamily()) { 128 m_hosts.checkConsistency(); 128 129 AtomicString hostName = url.host(); 129 130 host = m_hosts.get(hostName.impl()); … … 170 171 171 172 Vector<Host*> hostsToServe; 173 m_hosts.checkConsistency(); 172 174 HostMap::iterator i = m_hosts.begin(); 173 175 HostMap::iterator end = m_hosts.end(); … … 206 208 207 209 AtomicString hostName = url.host(); 210 m_hosts.checkConsistency(); 208 211 RefPtr<Host> host = m_hosts.get(hostName.impl()); 209 212 if (!host) { … … 221 224 222 225 AtomicString hostName = url.host(); 226 m_hosts.checkConsistency(); 223 227 RefPtr<Host> host = m_hosts.get(hostName.impl()); 224 228 ASSERT(host); … … 237 241 238 242 Vector<Host*> hostsToCancel; 243 m_hosts.checkConsistency(); 239 244 HostMap::iterator i = m_hosts.begin(); 240 245 HostMap::iterator end = m_hosts.end(); -
trunk/WebCore/page/animation/CompositeAnimation.cpp
r46727 r53899 58 58 } 59 59 if (!m_keyframeAnimations.isEmpty()) { 60 m_keyframeAnimations.checkConsistency(); 60 61 AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end(); 61 62 for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) { … … 187 188 return; 188 189 190 m_keyframeAnimations.checkConsistency(); 191 189 192 AnimationNameMap::const_iterator kfend = m_keyframeAnimations.end(); 190 193 … … 263 266 updateTransitions(renderer, currentStyle, targetStyle); 264 267 updateKeyframeAnimations(renderer, currentStyle, targetStyle); 268 m_keyframeAnimations.checkConsistency(); 265 269 266 270 if (currentStyle) { … … 296 300 } 297 301 302 m_keyframeAnimations.checkConsistency(); 303 298 304 for (Vector<AtomicStringImpl*>::const_iterator it = m_keyframeAnimationOrderMap.begin(); it != m_keyframeAnimationOrderMap.end(); ++it) { 299 305 RefPtr<KeyframeAnimation> keyframeAnimation = m_keyframeAnimations.get(*it); … … 316 322 } 317 323 if (!m_keyframeAnimations.isEmpty()) { 324 m_keyframeAnimations.checkConsistency(); 318 325 AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end(); 319 326 for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) { … … 342 349 } 343 350 if (!m_keyframeAnimations.isEmpty()) { 351 m_keyframeAnimations.checkConsistency(); 344 352 AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end(); 345 353 for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) { … … 363 371 // So we need to iterate through all animations 364 372 if (!m_keyframeAnimations.isEmpty()) { 373 m_keyframeAnimations.checkConsistency(); 365 374 AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end(); 366 375 for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) { … … 382 391 383 392 if (!m_keyframeAnimations.isEmpty()) { 393 m_keyframeAnimations.checkConsistency(); 384 394 AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end(); 385 395 for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) { … … 406 416 407 417 if (!m_keyframeAnimations.isEmpty()) { 418 m_keyframeAnimations.checkConsistency(); 408 419 AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end(); 409 420 for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) { … … 451 462 { 452 463 if (!m_keyframeAnimations.isEmpty()) { 464 m_keyframeAnimations.checkConsistency(); 453 465 AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end(); 454 466 for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) { … … 474 486 if (!name) 475 487 return false; 488 489 m_keyframeAnimations.checkConsistency(); 476 490 477 491 RefPtr<KeyframeAnimation> keyframeAnim = m_keyframeAnimations.get(name.impl()); … … 510 524 511 525 if (!m_keyframeAnimations.isEmpty()) { 526 m_keyframeAnimations.checkConsistency(); 512 527 AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end(); 513 528 for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) { -
trunk/WebCore/platform/TreeShared.h
r51158 r53899 45 45 { 46 46 ASSERT(isMainThread()); 47 ASSERT(!m_refCount); 47 48 ASSERT(m_deletionHasBegun); 48 49 } … … 59 60 { 60 61 ASSERT(isMainThread()); 62 ASSERT(m_refCount >= 0); 61 63 ASSERT(!m_deletionHasBegun); 62 64 ASSERT(!m_inRemovedLastRefFunction);
Note: See TracChangeset
for help on using the changeset viewer.