Skip to content

Commit

Permalink
ASSERT in Document::unregisterCollection reloading apple.com
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zdobersek committed Aug 7, 2014
1 parent f8273f1 commit 25193b6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 18 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,21 @@
2014-08-07 Zan Dobersek <zdobersek@igalia.com>

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 <bfulgham@apple.com>

[Win] Correct build errors when WebGL Disabled
Expand Down
3 changes: 0 additions & 3 deletions Source/WebCore/dom/Document.cpp
Expand Up @@ -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);
}

Expand Down

0 comments on commit 25193b6

Please sign in to comment.