[webkit-changes] [WebKit/WebKit] d9ba14: Document::m_nodeIterators should be WeakHashSet

Ryosuke Niwa noreply at github.com
Mon May 22 11:20:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d9ba14bdee8bc50f19a82610165fa3e720884afa
      https://github.com/WebKit/WebKit/commit/d9ba14bdee8bc50f19a82610165fa3e720884afa
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-05-22 (Mon, 22 May 2023)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/dom/NodeIterator.h

  Log Message:
  -----------
  Document::m_nodeIterators should be WeakHashSet
https://bugs.webkit.org/show_bug.cgi?id=257079

Reviewed by Chris Dumez.

Make NodeIterator compatible with WeakPtr and use WeakHashSet for m_nodeIterators in Document.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::attachNodeIterator):
(WebCore::Document::detachNodeIterator):
(WebCore::Document::moveNodeIteratorsToNewDocument): Renamed from moveNodeIteratorsToNewDocumentSlowCase.
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
* Source/WebCore/dom/Document.h:
(WebCore::Document::moveNodeIteratorsToNewDocument): Deleted.
* Source/WebCore/dom/NodeIterator.h:

Canonical link: https://commits.webkit.org/264334@main




More information about the webkit-changes mailing list