<?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>171419</bug_id>
          
          <creation_ts>2017-04-27 21:54:31 -0700</creation_ts>
          <short_desc>Serializing and deserializing SharedArrayBuffer</short_desc>
          <delta_ts>2022-03-08 11:26:18 -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>DOM</component>
          <version>Safari Technology Preview</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>
          
          <blocked>228755</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne van Kesteren">annevk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>fpizlo</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1302488</commentid>
    <comment_count>0</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2017-04-27 21:54:31 -0700</bug_when>
    <thetext>Tests are in web-platform-tests:

  html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/

Online version (times out at times, not sure what&apos;s up): https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/

Change to the standard which will land later today: https://github.com/whatwg/html/pull/2518

Once it lands, it&apos;s part of https://html.spec.whatwg.org/multipage/infrastructure.html#safe-passing-of-structured-data

(Note that quite a few tests might not be applicable due to various APIs not being supported by WebKit, but even so there&apos;s still bugs there as far as I could tell.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1791835</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2021-09-09 03:39:08 -0700</bug_when>
    <thetext>@Chris
I opened https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-history.https.html and it said there is no SharedArrayBuffer.
Are some headers missing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1791887</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-09-09 07:26:15 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #1)
&gt; @Chris
&gt; I opened
&gt; https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/
&gt; shared-array-buffers/serialization-via-history.https.html and it said there
&gt; is no SharedArrayBuffer.
&gt; Are some headers missing?

I see:
assert_throws_dom: function &quot;() =&gt; { history[method](new SharedArrayBuffer(), &quot;dummy title&quot;); }&quot; did not throw

The subtests are failing for me but not due to lack of SharedArrayBuffer support.

From Web Inspector, I can see that the test is serving the COOP+COEP headers:
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin

@Yusuke, I&apos;ve enabled COOP + COEP by default only very recently. Maybe you tested on a build that didn&apos;t have them enabled yet?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1792168</commentid>
    <comment_count>3</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2021-09-09 16:59:18 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #2)
&gt; (In reply to Yusuke Suzuki from comment #1)
&gt; &gt; @Chris
&gt; &gt; I opened
&gt; &gt; https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/
&gt; &gt; shared-array-buffers/serialization-via-history.https.html and it said there
&gt; &gt; is no SharedArrayBuffer.
&gt; &gt; Are some headers missing?
&gt; 
&gt; I see:
&gt; assert_throws_dom: function &quot;() =&gt; { history[method](new
&gt; SharedArrayBuffer(), &quot;dummy title&quot;); }&quot; did not throw
&gt; 
&gt; The subtests are failing for me but not due to lack of SharedArrayBuffer
&gt; support.
&gt; 
&gt; From Web Inspector, I can see that the test is serving the COOP+COEP headers:
&gt; Cross-Origin-Embedder-Policy: require-corp
&gt; Cross-Origin-Opener-Policy: same-origin
&gt; 
&gt; @Yusuke, I&apos;ve enabled COOP + COEP by default only very recently. Maybe you
&gt; tested on a build that didn&apos;t have them enabled yet?

Thanks!
Hmm, I&apos;ve tried opening https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-history.https.html with WebKit r282238, but I&apos;m getting an error

assert_throws_dom: function &quot;() =&gt; { history[method](new SharedArrayBuffer(), &quot;dummy title&quot;); }&quot; threw object &quot;ReferenceError: Can&apos;t find variable: SharedArrayBuffer&quot; that is not a DOMException DataCloneError: property &quot;code&quot; is equal to undefined, expected 25

I also opened the inspector, and it seems that SharedArrayBuffer is not defined.
Is some flag necessary?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1792172</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-09-09 17:04:56 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #3)
&gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; (In reply to Yusuke Suzuki from comment #1)
&gt; &gt; &gt; @Chris
&gt; &gt; &gt; I opened
&gt; &gt; &gt; https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/
&gt; &gt; &gt; shared-array-buffers/serialization-via-history.https.html and it said there
&gt; &gt; &gt; is no SharedArrayBuffer.
&gt; &gt; &gt; Are some headers missing?
&gt; &gt; 
&gt; &gt; I see:
&gt; &gt; assert_throws_dom: function &quot;() =&gt; { history[method](new
&gt; &gt; SharedArrayBuffer(), &quot;dummy title&quot;); }&quot; did not throw
&gt; &gt; 
&gt; &gt; The subtests are failing for me but not due to lack of SharedArrayBuffer
&gt; &gt; support.
&gt; &gt; 
&gt; &gt; From Web Inspector, I can see that the test is serving the COOP+COEP headers:
&gt; &gt; Cross-Origin-Embedder-Policy: require-corp
&gt; &gt; Cross-Origin-Opener-Policy: same-origin
&gt; &gt; 
&gt; &gt; @Yusuke, I&apos;ve enabled COOP + COEP by default only very recently. Maybe you
&gt; &gt; tested on a build that didn&apos;t have them enabled yet?
&gt; 
&gt; Thanks!
&gt; Hmm, I&apos;ve tried opening
&gt; https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/
&gt; shared-array-buffers/serialization-via-history.https.html with WebKit
&gt; r282238, but I&apos;m getting an error
&gt; 
&gt; assert_throws_dom: function &quot;() =&gt; { history[method](new
&gt; SharedArrayBuffer(), &quot;dummy title&quot;); }&quot; threw object &quot;ReferenceError: Can&apos;t
&gt; find variable: SharedArrayBuffer&quot; that is not a DOMException DataCloneError:
&gt; property &quot;code&quot; is equal to undefined, expected 25
&gt; 
&gt; I also opened the inspector, and it seems that SharedArrayBuffer is not
&gt; defined.
&gt; Is some flag necessary?

Oh, I had not correctly enabled the COEP feature. Fixed in https://commits.webkit.org/r282245.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1792201</commentid>
    <comment_count>5</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2021-09-09 18:50:08 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #4)
&gt; (In reply to Yusuke Suzuki from comment #3)
&gt; &gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; &gt; (In reply to Yusuke Suzuki from comment #1)
&gt; &gt; &gt; &gt; @Chris
&gt; &gt; &gt; &gt; I opened
&gt; &gt; &gt; &gt; https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/
&gt; &gt; &gt; &gt; shared-array-buffers/serialization-via-history.https.html and it said there
&gt; &gt; &gt; &gt; is no SharedArrayBuffer.
&gt; &gt; &gt; &gt; Are some headers missing?
&gt; &gt; &gt; 
&gt; &gt; &gt; I see:
&gt; &gt; &gt; assert_throws_dom: function &quot;() =&gt; { history[method](new
&gt; &gt; &gt; SharedArrayBuffer(), &quot;dummy title&quot;); }&quot; did not throw
&gt; &gt; &gt; 
&gt; &gt; &gt; The subtests are failing for me but not due to lack of SharedArrayBuffer
&gt; &gt; &gt; support.
&gt; &gt; &gt; 
&gt; &gt; &gt; From Web Inspector, I can see that the test is serving the COOP+COEP headers:
&gt; &gt; &gt; Cross-Origin-Embedder-Policy: require-corp
&gt; &gt; &gt; Cross-Origin-Opener-Policy: same-origin
&gt; &gt; &gt; 
&gt; &gt; &gt; @Yusuke, I&apos;ve enabled COOP + COEP by default only very recently. Maybe you
&gt; &gt; &gt; tested on a build that didn&apos;t have them enabled yet?
&gt; &gt; 
&gt; &gt; Thanks!
&gt; &gt; Hmm, I&apos;ve tried opening
&gt; &gt; https://w3c-test.org/html/infrastructure/safe-passing-of-structured-data/
&gt; &gt; shared-array-buffers/serialization-via-history.https.html with WebKit
&gt; &gt; r282238, but I&apos;m getting an error
&gt; &gt; 
&gt; &gt; assert_throws_dom: function &quot;() =&gt; { history[method](new
&gt; &gt; SharedArrayBuffer(), &quot;dummy title&quot;); }&quot; threw object &quot;ReferenceError: Can&apos;t
&gt; &gt; find variable: SharedArrayBuffer&quot; that is not a DOMException DataCloneError:
&gt; &gt; property &quot;code&quot; is equal to undefined, expected 25
&gt; &gt; 
&gt; &gt; I also opened the inspector, and it seems that SharedArrayBuffer is not
&gt; &gt; defined.
&gt; &gt; Is some flag necessary?
&gt; 
&gt; Oh, I had not correctly enabled the COEP feature. Fixed in
&gt; https://commits.webkit.org/r282245.

Nice!!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849340</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-03-08 11:26:18 -0800</bug_when>
    <thetext>&lt;rdar://problem/89979253&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>