Changeset 171261 in webkit
- Timestamp:
- Jul 19, 2014 3:08:55 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r171259 r171261 1 2014-07-19 Zan Dobersek <zdobersek@igalia.com> 2 3 Document::unregisterNodeListforInvalidation() and Document::unregisterCollection() have incorrect assertions 4 https://bugs.webkit.org/show_bug.cgi?id=134869 5 6 Reviewed by Darin Adler. 7 8 Both methods should assert that the relevant HashMap is either empty if invalidation originates 9 from Document::invalidateNodeListAndCollectionCaches() or acutally contains the element that is 10 being invalidated. In the first case the HashMap is empty because its entries were moved out in 11 the Document::invalidateNodeListAndCollectionCaches(). 12 13 This was exposed by r170995 (later rolled out in r170999) which introduced move constructor and 14 move assignment operators for HashTable. The assertions in the titular methods won't be passing 15 until r170995 relands. 16 17 * dom/Document.cpp: 18 (WebCore::Document::unregisterNodeListForInvalidation): 19 1 20 2014-07-18 Eric Carlson <eric.carlson@apple.com> 2 21 -
trunk/Source/WebCore/dom/Document.cpp
r170774 r171261 3492 3492 if (!list.isRegisteredForInvalidationAtDocument()) 3493 3493 return; 3494 if (!m_listsInvalidatedAtDocument.size()) { 3495 ASSERT(m_inInvalidateNodeListAndCollectionCaches);3496 return;3497 }3498 ASSERT(m_listsInvalidatedAtDocument.contains(&list));3494 3495 list.setRegisteredForInvalidationAtDocument(false); 3496 ASSERT(m_inInvalidateNodeListAndCollectionCaches 3497 ? m_listsInvalidatedAtDocument.isEmpty() 3498 : m_listsInvalidatedAtDocument.contains(&list)); 3499 3499 m_listsInvalidatedAtDocument.remove(&list); 3500 list.setRegisteredForInvalidationAtDocument(false);3501 3500 } 3502 3501 … … 3512 3511 ASSERT(m_nodeListAndCollectionCounts[collection.invalidationType()]); 3513 3512 m_nodeListAndCollectionCounts[collection.invalidationType()]--; 3514 if (collection.isRootedAtDocument()) { 3515 if (!m_collectionsInvalidatedAtDocument.size()) { 3516 ASSERT(m_inInvalidateNodeListAndCollectionCaches); 3517 return; 3518 } 3519 ASSERT(m_collectionsInvalidatedAtDocument.contains(&collection)); 3520 m_collectionsInvalidatedAtDocument.remove(&collection); 3521 } 3513 if (!collection.isRootedAtDocument()) 3514 return; 3515 3516 ASSERT(m_inInvalidateNodeListAndCollectionCaches 3517 ? m_collectionsInvalidatedAtDocument.isEmpty() 3518 : m_collectionsInvalidatedAtDocument.contains(&collection)); 3519 m_collectionsInvalidatedAtDocument.remove(&collection); 3522 3520 } 3523 3521
Note: See TracChangeset
for help on using the changeset viewer.