document.all should behave like the other collections on document (multiple calls return the same objects.)
Created attachment 119699 [details]
Comment on attachment 119699 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=119699&action=review
> - if (m_baseIsRetained)
> + if (!m_base->isDocumentNode())
Gnarf! This isn't correct, isDocumentNode() will be false after ~Document() runs (if the HTMLCollection is being destroyed after the Document removed the last ref.)
Created attachment 119726 [details]
Keep the m_baseIsRetained logic in HTMLCollection, since we can't depend on calling Node::isDocumentNode() after ~Document().
m_baseIsRetained can go away by making all HTMLCollections cached instead, since the collection will then never hold a ref on its base node.
Comment on attachment 119726 [details]
The ChangeLog could use a sentence or two about why this is a good thing. Bonus points for some performance measurements.
Committed r103166: <http://trac.webkit.org/changeset/103166>