Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6f7684791a5e8e298781278066ce1361b686375e
      
https://github.com/WebKit/WebKit/commit/6f7684791a5e8e298781278066ce1361b686375e
  Author: Chris Dumez <[email protected]>
  Date:   2026-03-14 (Sat, 14 Mar 2026)

  Changed paths:
    M Source/WebCore/bindings/js/JSTrustedTypePolicyCustom.cpp
    M Source/WebCore/dom/TrustedTypePolicy.cpp
    M Source/WebCore/dom/TrustedTypePolicy.h
    M Source/WebCore/dom/TrustedTypePolicyOptions.h

  Log Message:
  -----------
  Simplify visitAdditionalChildrenInGCThread() for TrustedTypePolicy
https://bugs.webkit.org/show_bug.cgi?id=309948

Reviewed by Geoffrey Garen and Ryosuke Niwa.

Remove Lock used when accessing m_options and mark m_options as const
instead. Since m_options is const, its smart pointers cannot be modified
on the main thread while the GC thread is accessing them.

Note that even though there was a lock, it was not doing much since the
GC thread was holding raw pointers to those main thread objects outside
the lock's scope.

* Source/WebCore/bindings/js/JSTrustedTypePolicyCustom.cpp:
(WebCore::JSTrustedTypePolicy::visitAdditionalChildrenInGCThread):
* Source/WebCore/dom/TrustedTypePolicy.cpp:
(WebCore::TrustedTypePolicy::getPolicyValue):
(WebCore::TrustedTypePolicy::visitAdditionalChildrenInGCThread):
* Source/WebCore/dom/TrustedTypePolicy.h:
(WebCore::TrustedTypePolicy::name const):
(WebCore::TrustedTypePolicy::options const): Deleted.
(WebCore::TrustedTypePolicy::WTF_RETURNS_LOCK): Deleted.
* Source/WebCore/dom/TrustedTypePolicyOptions.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to