<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>305413</bug_id>
          
          <creation_ts>2026-01-13 12:26:29 -0800</creation_ts>
          <short_desc>Make toJS() conversions require correct nullness and subtyping, take 2</short_desc>
          <delta_ts>2026-01-16 07:38:12 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Bindings</component>
          <version>Safari 18</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>305621</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sam Weinig">sam</reporter>
          <assigned_to name="Anne van Kesteren">annevk</assigned_to>
          <cc>annevk</cc>
    
    <cc>cdumez</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2171524</commentid>
    <comment_count>0</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2026-01-13 12:26:29 -0800</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2171532</commentid>
    <comment_count>1</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2026-01-13 13:08:56 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/56513</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172347</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-01-15 15:07:25 -0800</bug_when>
    <thetext>Committed 305676@main (f96aecc3dd48): &lt;https://commits.webkit.org/305676@main&gt;

Reviewed commits have been landed. Closing PR #56513 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172348</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-01-15 15:08:13 -0800</bug_when>
    <thetext>&lt;rdar://problem/168260035&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172410</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2026-01-15 21:06:44 -0800</bug_when>
    <thetext>Reopened Bugzilla.
REGRESSION(305676@main): Broke all Apple Internal builds, tracking revert in https://bugs.webkit.org/show_bug.cgi?id=305621.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172441</commentid>
    <comment_count>5</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2026-01-15 23:42:33 -0800</bug_when>
    <thetext>&lt;rdar://168284687&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172447</commentid>
    <comment_count>6</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2026-01-16 00:17:55 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/56696</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172461</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-01-16 02:48:09 -0800</bug_when>
    <thetext>Committed 305702@main (c6f87a59606a): &lt;https://commits.webkit.org/305702@main&gt;

Reviewed commits have been landed. Closing PR #56696 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172510</commentid>
    <comment_count>8</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2026-01-16 07:38:12 -0800</bug_when>
    <thetext>*** Bug 305252 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>