Bug 300183

Summary: [Bindings] Generated `toJSNewlyCreated()` should account for descendants
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 300206, 300212, 300213, 300223, 300225, 300226, 300229, 300281, 300282, 300288, 300419, 300425, 300427, 300467    

Chris Dumez
Reported 2025-10-04 19:18:45 PDT
Currently, the binding can only generate a trivial version of `toJSNewlyCreated()`, which does not account for descendants. This is annoying for developers as they usually find the hard way and then they have to write custom bindings code to create the right wrapper for the right subclass type. This patch updates the bindings generator to generate a more correct version of `toJSNewlyCreated()` when an interface has descendants and drops the custom bindings for Text.idl as proof of concept. I will then follow-up to drop more custom bindings.
Attachments
Chris Dumez
Comment 1 2025-10-04 19:49:54 PDT
Note You need to log in before you can comment on or make changes to this bug.