From 25193b6b4e83be46b394d93159692339bdc8a5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDan=20Dober=C5=A1ek?= Date: Thu, 7 Aug 2014 14:11:12 +0000 Subject: [PATCH] ASSERT in Document::unregisterCollection reloading apple.com https://bugs.webkit.org/show_bug.cgi?id=135168 Reviewed by Andreas Kling. * dom/Document.cpp: (WebCore::Document::unregisterCollection): This assertion was failing because the passed-in HTMLCollection was not invalidated for a non-related attribute, but was instead unregistered during destruction, at which point the m_collectionsInvalidatedAtDocument HashSet was empty. The assertion could be trivially reduced into checking that the HashSet is empty when it was moved out of in Document::invalidateNodeListAndCollectionCaches(), but that just checks that the move semantics on HashSet work properly. Removing a non-existent element from a HashSet is harmless, so the assertion can be removed completely. Canonical link: https://commits.webkit.org/153571@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172210 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 18 ++++++++++++++++++ Source/WebCore/dom/Document.cpp | 3 --- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 6d77397b9999f..f1ff062a2cbce 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,21 @@ +2014-08-07 Zan Dobersek + + ASSERT in Document::unregisterCollection reloading apple.com + https://bugs.webkit.org/show_bug.cgi?id=135168 + + Reviewed by Andreas Kling. + + * dom/Document.cpp: + (WebCore::Document::unregisterCollection): This assertion was failing + because the passed-in HTMLCollection was not invalidated for a non-related + attribute, but was instead unregistered during destruction, at which point + the m_collectionsInvalidatedAtDocument HashSet was empty. + The assertion could be trivially reduced into checking that the HashSet is + empty when it was moved out of in Document::invalidateNodeListAndCollectionCaches(), + but that just checks that the move semantics on HashSet work properly. Removing + a non-existent element from a HashSet is harmless, so the assertion can be removed + completely. + 2014-08-06 Brent Fulgham [Win] Correct build errors when WebGL Disabled diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index 923094d7ffa8f..9a82bc10551a0 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -3520,9 +3520,6 @@ void Document::unregisterCollection(HTMLCollection& collection) if (!collection.isRootedAtDocument()) return; - ASSERT(m_inInvalidateNodeListAndCollectionCaches - ? m_collectionsInvalidatedAtDocument.isEmpty() - : m_collectionsInvalidatedAtDocument.contains(&collection)); m_collectionsInvalidatedAtDocument.remove(&collection); }