Implement trusted types for setTimeout/setInterval (#38736)

I had a difficult time figuring out where the relevant steps had to be
added. Therefore, I aggressively commented the spec steps so eventually
I discovered where I should add them.

Part of #36258

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Tim van der Lippe 2025-08-17 22:53:16 +02:00 committed by GitHub
parent a31235e52b
commit 4de9a9d100
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 149 additions and 120 deletions

View file

@ -651,7 +651,7 @@ DOMInterfaces = {
},
'Window': {
'canGc': ['Stop', 'Fetch', 'Stop', 'Fetch', 'Open', 'CreateImageBitmap', 'CreateImageBitmap_', 'TrustedTypes', 'WebdriverCallback', 'WebdriverException'],
'canGc': ['Stop', 'Fetch', 'Stop', 'Fetch', 'Open', 'CreateImageBitmap', 'CreateImageBitmap_', 'SetInterval', 'SetTimeout', 'TrustedTypes', 'WebdriverCallback', 'WebdriverException'],
'inRealms': ['Fetch', 'GetOpener', 'WebdriverCallback', 'WebdriverException'],
'additionalTraits': ['crate::interfaces::WindowHelpers'],
},
@ -663,7 +663,7 @@ DOMInterfaces = {
'WorkerGlobalScope': {
'inRealms': ['Fetch'],
'canGc': ['Fetch', 'CreateImageBitmap', 'CreateImageBitmap_', 'ImportScripts', 'TrustedTypes'],
'canGc': ['Fetch', 'CreateImageBitmap', 'CreateImageBitmap_', 'ImportScripts', 'SetInterval', 'SetTimeout', 'TrustedTypes'],
},
'Worklet': {