RESOLVED FIXED305413
Make toJS() conversions require correct nullness and subtyping, take 2
https://bugs.webkit.org/show_bug.cgi?id=305413
Summary Make toJS() conversions require correct nullness and subtyping, take 2
Sam Weinig
Reported 2026-01-13 12:26:29 PST
Current the generated toJS() functions allow callers to pass in null values, automatically return jsNull(). This makes the bindings pretty non-strict about specifying whether an attribute or operation return type are nullable or not, and as a result, we get it wrong a lot. They also don't actually check that the type is the type or a subtype. Anne took a crack at this problem in https://bugs.webkit.org/show_bug.cgi?id=305252, this is my crack at it.
Attachments
Sam Weinig
Comment 1 2026-01-13 13:08:56 PST
EWS
Comment 2 2026-01-15 15:07:25 PST
Committed 305676@main (f96aecc3dd48): <https://commits.webkit.org/305676@main> Reviewed commits have been landed. Closing PR #56513 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2026-01-15 15:08:13 PST
Jonathan Bedard
Comment 4 2026-01-15 21:06:44 PST
Reopened Bugzilla. REGRESSION(305676@main): Broke all Apple Internal builds, tracking revert in https://bugs.webkit.org/show_bug.cgi?id=305621.
Anne van Kesteren
Comment 5 2026-01-15 23:42:33 PST
Anne van Kesteren
Comment 6 2026-01-16 00:17:55 PST
EWS
Comment 7 2026-01-16 02:48:09 PST
Committed 305702@main (c6f87a59606a): <https://commits.webkit.org/305702@main> Reviewed commits have been landed. Closing PR #56696 and removing active labels.
Anne van Kesteren
Comment 8 2026-01-16 07:38:12 PST
*** Bug 305252 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.