[webkit-reviews] review granted: [Bug 135168] ASSERT in Document::unregisterCollection reloading apple.com : [Attachment 235933] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 2 09:24:37 PDT 2014

Darin Adler <darin at apple.com> has granted Zan Dobersek
<zandobersek at gmail.com>'s request for review:
Bug 135168: ASSERT in Document::unregisterCollection reloading apple.com

Attachment 235933: Patch

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=235933&action=review

I’m going to say review+, but I think removing the assertion entirely would be

> Source/WebCore/dom/Document.cpp:3527
> -    ASSERT(m_inInvalidateNodeListAndCollectionCaches
> -	   ? m_collectionsInvalidatedAtDocument.isEmpty()
> -	   : m_collectionsInvalidatedAtDocument.contains(&collection));
> +    // This only ensures that
Document::invalidateNodeListAndCollectionCaches() empties out
> +    // the m_collectionsInvalidatedAtDocument HashSet but shouldn't assert
that the collection
> +    // is contianed in the HashSet otherwise. See
> +    ASSERT(m_inInvalidateNodeListAndCollectionCaches &&
> +	   || !m_inInvalidateNodeListAndCollectionCaches);

I don’t think we need an assertion at all. This asserts so little that it’s
pretty much useless. Also, lets not land the misspelling contianed.

More information about the webkit-reviews mailing list