Cleanups for future script crate split (#35987)

* script: Avoid direct impl blocks on generated dicts and unions.

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

* script: Remove references to codegen-specific import module.

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

* Fix tidy.

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

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-03-16 09:46:14 -04:00 committed by GitHub
parent 3ecd1c0699
commit d35da38a2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 211 additions and 146 deletions

View file

@ -673,10 +673,26 @@ DOMInterfaces = {
}
Dictionaries = {
'AudioNodeOptions': {
'derives': ['Clone', 'Copy'],
},
'ChannelMergerOptions': {
'derives': ['Clone', 'Copy'],
},
'ConstantSourceOptions': {
'derives': ['Clone', 'Copy'],
},
'FontFaceDescriptors': {
'derives': ['Clone', 'MallocSizeOf']
},
'GainOptions': {
'derives': ['Clone', 'Copy'],
},
'GPUCanvasConfiguration': {
'derives': ['Clone']
},
@ -696,6 +712,18 @@ Dictionaries = {
'HeadersInit': {
'derives': ["Clone"],
},
'IIRFilterOptions': {
'derives': ['Clone'],
},
'StereoPannerOptions': {
'derives': ['Clone', 'Copy'],
},
'XRWebGLLayerInit': {
'derives': ['Clone', 'Copy'],
},
}
Enums = {

View file

@ -7334,6 +7334,7 @@ impl{self.generic} Clone for {self.makeClassName(self.dictionary)}{self.genericS
"}\n"
"\n"
f"impl{self.generic} {selfName}{self.genericSuffix} {{\n"
" #[allow(clippy::wrong_self_convention)]\n"
" pub(crate) unsafe fn to_jsobject(&self, cx: *mut JSContext, mut obj: MutableHandleObject) {\n"
f"{CGIndenter(CGList(memberInserts), indentLevel=8).define()} }}\n"
"}\n"