[Webkit-unassigned] [Bug 275951] New: Trusted Types default policy is collected by GC

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 27 06:14:22 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=275951

            Bug ID: 275951
           Summary: Trusted Types default policy is collected by GC
           Product: WebKit
           Version: Safari 17
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: lwarlow at igalia.com

There is a bug where the default policy's callback functions are being erroneously collected by GC.

To Reproduce:

Load example.com in STP with the trusted types flag on.
Open web inspector.

trustedTypes.createPolicy('default', { createScript: (s) => s })

trustedTypes.defaultPolicy.createScript('foo')

clear() 

// Then press the collect garbage button in web inspector

trustedTypes.defaultPolicy.createScript('foo')

-> TypeError: Policy default's TrustedTypePolicyOptions did not specify a 'createScript' member.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240627/165aa72b/attachment.htm>


More information about the webkit-unassigned mailing list