[whatwg/webidl] Give SharedArrayBuffer a dedicated type (PR #1311)

Generally IDL objects have been 1:1 with ECMAScript objects, except for SharedArrayBuffer. That was instead represented as [AllowShared] ArrayBuffer, although that includes ArrayBuffer as well. This created a number of challenges, e.g., how to return a SharedArrayBuffer object.

So we make these changes here that will also require corresponding downstream fixes:

* SharedArrayBuffer is now its own type.
* [AllowShared] only applies to buffer view types.
* AllowSharedBufferSource takes over from [AllowShared] BufferSource.

Fixes #865 and fixes #961.

<!--
Thank you for contributing to the Web IDL Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.
-->

- [ ] At least two implementers are interested (and none opposed):
   * …
   * …
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * …
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: …
   * Gecko: …
   * WebKit: …
   * Deno: …
   * Node.js: …
   * webidl2.js: …
   * widlparser: …
- [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: …

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)

You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/webidl/pull/1311

-- Commit Summary --

  * Give SharedArrayBuffer a dedicated type

-- File Changes --

    M index.bs (223)

-- Patch Links --

https://github.com/whatwg/webidl/pull/1311.patch
https://github.com/whatwg/webidl/pull/1311.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1311
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1311@github.com>

Received on Tuesday, 30 May 2023 15:47:20 UTC