Title: [172210] trunk/Source/WebCore
Revision
172210
Author
[email protected]
Date
2014-08-07 07:11:12 -0700 (Thu, 07 Aug 2014)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (172209 => 172210)


--- trunk/Source/WebCore/ChangeLog	2014-08-07 13:06:10 UTC (rev 172209)
+++ trunk/Source/WebCore/ChangeLog	2014-08-07 14:11:12 UTC (rev 172210)
@@ -1,3 +1,21 @@
+2014-08-07  Zan Dobersek  <[email protected]>
+
+        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  <[email protected]>
 
         [Win] Correct build errors when WebGL Disabled

Modified: trunk/Source/WebCore/dom/Document.cpp (172209 => 172210)


--- trunk/Source/WebCore/dom/Document.cpp	2014-08-07 13:06:10 UTC (rev 172209)
+++ trunk/Source/WebCore/dom/Document.cpp	2014-08-07 14:11:12 UTC (rev 172210)
@@ -3520,9 +3520,6 @@
     if (!collection.isRootedAtDocument())
         return;
 
-    ASSERT(m_inInvalidateNodeListAndCollectionCaches
-        ? m_collectionsInvalidatedAtDocument.isEmpty()
-        : m_collectionsInvalidatedAtDocument.contains(&collection));
     m_collectionsInvalidatedAtDocument.remove(&collection);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to