<?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>254864</bug_id>
          
          <creation_ts>2023-04-01 03:05:57 -0700</creation_ts>
          <short_desc>Implement [AllowShared] suport in Web IDL</short_desc>
          <delta_ts>2026-04-18 21:31:40 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://github.com/whatwg/webidl/issues/1491</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>258131</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne van Kesteren">annevk</reporter>
          <assigned_to name="Anne van Kesteren">annevk</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>cdumez</cc>
    
    <cc>heycam</cc>
    
    <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1945943</commentid>
    <comment_count>0</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-04-01 03:05:57 -0700</bug_when>
    <thetext>It seems that we currently don&apos;t throw in places that are not supposed to take shared memory: https://wpt.fyi/results/xhr/send-data-sharedarraybuffer.any.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1947486</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-08 03:06:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/107786134&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953495</commentid>
    <comment_count>2</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-05-07 03:50:09 -0700</bug_when>
    <thetext>Per https://github.com/WebKit/WebKit/commit/02a7ddd1949f734535c90d93a6d10eea06afcdce#diff-93b28dd1c69f1ae018f811d9fa195b7ccff18e02ffca56c1864ba79ebbe56b30 we have at least some support for [AllowShared], so why does the IDL layer not end up throwing here?

Yusuke, do you know?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1994846</commentid>
    <comment_count>3</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2023-11-26 14:52:17 -0800</bug_when>
    <thetext>(In reply to Anne van Kesteren from comment #2)
&gt; Per
&gt; https://github.com/WebKit/WebKit/commit/
&gt; 02a7ddd1949f734535c90d93a6d10eea06afcdce#diff-
&gt; 93b28dd1c69f1ae018f811d9fa195b7ccff18e02ffca56c1864ba79ebbe56b30 we have at
&gt; least some support for [AllowShared], so why does the IDL layer not end up
&gt; throwing here?
&gt; 
&gt; Yusuke, do you know?

I have no idea, probably XHR is not using AllowShared.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1994847</commentid>
    <comment_count>4</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2023-11-26 14:53:11 -0800</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #3)
&gt; (In reply to Anne van Kesteren from comment #2)
&gt; &gt; Per
&gt; &gt; https://github.com/WebKit/WebKit/commit/
&gt; &gt; 02a7ddd1949f734535c90d93a6d10eea06afcdce#diff-
&gt; &gt; 93b28dd1c69f1ae018f811d9fa195b7ccff18e02ffca56c1864ba79ebbe56b30 we have at
&gt; &gt; least some support for [AllowShared], so why does the IDL layer not end up
&gt; &gt; throwing here?
&gt; &gt; 
&gt; &gt; Yusuke, do you know?
&gt; 
&gt; I have no idea, probably XHR is not using AllowShared.

It is probably largely depending on how XHR is implementing send function, I guess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2119223</commentid>
    <comment_count>5</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2025-05-23 00:52:28 -0700</bug_when>
    <thetext>I think I figured it out. What happens is that we apply ToString because we treat them as distinct types which does not quite match https://webidl.spec.whatwg.org/#js-union

I think this is correct for SharedArrayBuffer now that SharedArrayBuffer is a standalone type in Web IDL (though this might need more discussion), but this is incorrect for views on a SharedArrayBuffer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2201515</commentid>
    <comment_count>6</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2026-04-17 08:23:18 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/62978</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2201906</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-18 21:31:38 -0700</bug_when>
    <thetext>Committed 311536@main (7eb28729693c): &lt;https://commits.webkit.org/311536@main&gt;

Reviewed commits have been landed. Closing PR #62978 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>