tc39 / tc39/proposal-immutable-arraybuffer
Order of operations, when to throw or silently do nothing?
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 38
- 派生
- 7
- PR 合并指标
- 30 天内没有已合并 PR
描述
-
Should
sliceToImmutablewith reversed start and end throw an exception even thoughslicewith the same arguments would not? -
Should trying to write data in an immutable ArrayBuffer via a TypedArray element set throw, even though trying to write out-of-bounds or to a detached ArrayBuffer does not?
-
Should TypedArray write methods (copyWithin, fill, reverse, set, etc.) throw when their backing ArrayBuffer is immutable but the targeted range is zero-length? If so, how early or late in the algorithm? The methods currently inspect arguments after ValidateTypedArray.
Similarly,
-
How early or late in SetViewValue against an immutable ArrayBuffer should an exception be thrown? It currently inspects arguments before IsViewOutOfBounds.
-
Likewise for abstract operations such as ArrayBufferCopyAndDetach (which currently checks IsSharedArrayBuffer, then newLength, then IsDetachedBuffer).
-
And also for Atomics functions.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
检查列出的操作——sliceToImmutable、TypedArray write methods、SetViewValue、ArrayBufferCopyAndDetach 和 Atomics——并比较它们当前的验证顺序。只有在提案解决了不可变缓冲区错误应相对于参数、边界、分离和零长度检查何时发生之后,该 issue 才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- backend-api-design
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 20/100