Make generated proxy handlers and DOM object hooks generic (#35292)

* script: Make DOM proxy handlers generic over DOM types.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Make finalize and trace hooks generic over DOM types.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-02-05 07:51:34 -05:00 committed by GitHub
parent 1e164738d8
commit 2bd96633d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 72 additions and 46 deletions

View file

@ -319,7 +319,12 @@ impl DedicatedWorkerGlobalScope {
control_receiver,
insecure_requests_policy,
));
unsafe { DedicatedWorkerGlobalScopeBinding::Wrap(SafeJSContext::from_ptr(cx), scope) }
unsafe {
DedicatedWorkerGlobalScopeBinding::Wrap::<crate::DomTypeHolder>(
SafeJSContext::from_ptr(cx),
scope,
)
}
}
/// <https://html.spec.whatwg.org/multipage/#run-a-worker>