Bug 254864
| Summary: | Implement [AllowShared] suport in Web IDL | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Anne van Kesteren <annevk> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ashvayka, cdumez, heycam, mark.lam, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://github.com/whatwg/webidl/issues/1491 | ||
| Bug Depends on: | 258131 | ||
| Bug Blocks: | |||
Anne van Kesteren
It seems that we currently don't throw in places that are not supposed to take shared memory: https://wpt.fyi/results/xhr/send-data-sharedarraybuffer.any.html.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/107786134>
Anne van Kesteren
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?
Yusuke Suzuki
(In reply to Anne van Kesteren from comment #2)
> 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?
I have no idea, probably XHR is not using AllowShared.
Yusuke Suzuki
(In reply to Yusuke Suzuki from comment #3)
> (In reply to Anne van Kesteren from comment #2)
> > 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?
>
> I have no idea, probably XHR is not using AllowShared.
It is probably largely depending on how XHR is implementing send function, I guess.
Anne van Kesteren
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.