tc39 / tc39/proposal-immutable-arraybuffer

Review

Open
#30 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
38
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Informative

  • I plan to bring this proposal up at the Wasm CG meeting next week to get Wasm's take. I think this is orthogonal and does not step on Wasm's toes. There is an interesting future design question for reflecting WasmGC Arrays of scalars as JS TypedArrays. I imagine those reflections will not have detachable buffers, but still warrants some discussion with the CG.

Normative

  • DetachArrayBuffer needs to throw for immutable buffers.
    #38
  • Please have a reviewed PR against HTML for structured clone. I don't think there's much design space here, so I'm personally happy for this to be a stage 3 blocker instead of a stage 2.7 blocker. But should WHATWG give feedback that requires this proposal to change, we'd need to make normative changes during 2.7.
    https://github.com/whatwg/html/pull/11033
  • I'd love to implement this with mprotect. However, that requires page alignment. We can't reveal the page size to user code, as that's a fingerprinting vector. Fixing a page size seems too unergonomic. Ideas? (Using mprotect is a nice-to-have for V8, not a requirement.)

Editorial

  • Prefer ValidateTypedArray's use argument be renamed accessMode. Ditto for the other Validate AOs.
    #33
  • Rename [AllocateArrayBuffer]'s maxByteLength parameter to something more descriptive since it can be IMMUTABLE. (I suppose you're minimizing the diff for now?)
    #33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the checklist in issue #30, then read the referenced #38, #33, and WHATWG structured-clone pull request. The issue is done when the remaining normative, editorial, and design questions have explicit decisions or documented follow-up.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.