structuredClone loses ArrayBuffer and typed-array data
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, react-native
- 领域
- mobile-dev
调研方向
在当前 main 中找到 structuredClone polyfill,并首先使用 ArrayBuffer、DataView 和 typed arrays 复现问题,包括共享的 backing buffer 和被遮蔽的属性。追踪现有的对象克隆路径及其测试。当这些内置视图在不调用被遮蔽的 slice 或 constructor 属性的情况下保留其字节、类型、偏移量、长度和关系时,即视为完成;transfer 支持不在范围内。
由索引模型根据 Issue 内容生成。
描述
Description
The React Native structuredClone polyfill treats ArrayBuffer, DataView, and every typed array as arbitrary objects, returning plain objects that lose their internal bytes, view type, offsets, lengths, and shared backing-buffer relationships.
Expected behavior
ArrayBuffers should be copied through the intrinsic operation; DataView and all supported typed-array kinds should be reconstructed with their original offset/length and should share the same cloned backing buffer when cloned together. User-shadowed slice or constructor properties must not be invoked. Transfer support is outside this issue.
React Native Version
0.87.1 and current main
Affected Platforms
JavaScript runtime - All
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react/react-native 的其他 Issue
-
Needs: Triage :mag:
难度 2/5 1-3 小时 新手友好度 82/100
react/react-native#58565 · 1 条评论 · 2 个 reaction ·
-
Needs: Author Feedback Needs: Repro
难度 2/5 1-3 小时 新手友好度 88/100
react/react-native#58555 · 4 条评论 · 1 个 reaction ·
-
Needs: Attention Needs: Repro
难度 2/5 1-3 小时 新手友好度 85/100
react/react-native#58526 · 2 条评论 ·
-
Needs: Author Feedback Needs: Repro
难度 2/5 1-3 小时 新手友好度 85/100
react/react-native#58448 · 1 条评论 ·
-
Needs: Attention Needs: Repro
难度 2/5 半天 新手友好度 82/100
react/react-native#58441 · 2 条评论 ·
查看 react/react-native 的全部 Issue
相似的 Issue
-
Website Doc Typo 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 1/5 1-3 小时 新手友好度 92/100
autowarefoundation/autoware_universe#13413 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
automated-analysis bug memory-safety
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 88/100