Bug 275951
Summary: | Trusted Types default policy is collected by GC | ||
---|---|---|---|
Product: | WebKit | Reporter: | Luke Warlow <lwarlow> |
Component: | New Bugs | Assignee: | Luke Warlow <lwarlow> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 17 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 266630 |
Luke Warlow
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Luke Warlow
Pull request: https://github.com/WebKit/WebKit/pull/30232
EWS
Committed 280573@main (d3e88fd78692): <https://commits.webkit.org/280573@main>
Reviewed commits have been landed. Closing PR #30232 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/130960958>