Bug 171419
| Summary: | Serializing and deserializing SharedArrayBuffer | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Anne van Kesteren <annevk> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | cdumez, fpizlo, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 228755 | ||
Anne van Kesteren
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'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'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's still bugs there as far as I could tell.)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Yusuke Suzuki
@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?
Chris Dumez
(In reply to Yusuke Suzuki from comment #1)
> @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?
I see:
assert_throws_dom: function "() => { history[method](new SharedArrayBuffer(), "dummy title"); }" 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've enabled COOP + COEP by default only very recently. Maybe you tested on a build that didn't have them enabled yet?
Yusuke Suzuki
(In reply to Chris Dumez from comment #2)
> (In reply to Yusuke Suzuki from comment #1)
> > @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?
>
> I see:
> assert_throws_dom: function "() => { history[method](new
> SharedArrayBuffer(), "dummy title"); }" 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've enabled COOP + COEP by default only very recently. Maybe you
> tested on a build that didn't have them enabled yet?
Thanks!
Hmm, I'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'm getting an error
assert_throws_dom: function "() => { history[method](new SharedArrayBuffer(), "dummy title"); }" threw object "ReferenceError: Can't find variable: SharedArrayBuffer" that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25
I also opened the inspector, and it seems that SharedArrayBuffer is not defined.
Is some flag necessary?
Chris Dumez
(In reply to Yusuke Suzuki from comment #3)
> (In reply to Chris Dumez from comment #2)
> > (In reply to Yusuke Suzuki from comment #1)
> > > @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?
> >
> > I see:
> > assert_throws_dom: function "() => { history[method](new
> > SharedArrayBuffer(), "dummy title"); }" 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've enabled COOP + COEP by default only very recently. Maybe you
> > tested on a build that didn't have them enabled yet?
>
> Thanks!
> Hmm, I'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'm getting an error
>
> assert_throws_dom: function "() => { history[method](new
> SharedArrayBuffer(), "dummy title"); }" threw object "ReferenceError: Can't
> find variable: SharedArrayBuffer" that is not a DOMException DataCloneError:
> property "code" is equal to undefined, expected 25
>
> I also opened the inspector, and it seems that SharedArrayBuffer is not
> defined.
> Is some flag necessary?
Oh, I had not correctly enabled the COEP feature. Fixed in https://commits.webkit.org/r282245.
Yusuke Suzuki
(In reply to Chris Dumez from comment #4)
> (In reply to Yusuke Suzuki from comment #3)
> > (In reply to Chris Dumez from comment #2)
> > > (In reply to Yusuke Suzuki from comment #1)
> > > > @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?
> > >
> > > I see:
> > > assert_throws_dom: function "() => { history[method](new
> > > SharedArrayBuffer(), "dummy title"); }" 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've enabled COOP + COEP by default only very recently. Maybe you
> > > tested on a build that didn't have them enabled yet?
> >
> > Thanks!
> > Hmm, I'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'm getting an error
> >
> > assert_throws_dom: function "() => { history[method](new
> > SharedArrayBuffer(), "dummy title"); }" threw object "ReferenceError: Can't
> > find variable: SharedArrayBuffer" that is not a DOMException DataCloneError:
> > property "code" is equal to undefined, expected 25
> >
> > I also opened the inspector, and it seems that SharedArrayBuffer is not
> > defined.
> > Is some flag necessary?
>
> Oh, I had not correctly enabled the COEP feature. Fixed in
> https://commits.webkit.org/r282245.
Nice!!
Radar WebKit Bug Importer
<rdar://problem/89979253>