structuredClone coerces boxed primitives and flips false Boolean
維護者通常 1 天內回覆
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 68/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript, react-native
- 領域
- mobile
研究方向
從 React Native 的 structuredClone polyfill 入口點開始,使用 boxed Number、String、Boolean 和 Date 值重現該行為。檢查複製是否讀取內部 primitive,而不執行使用者的 coercion hook,保留 false Boolean 值,並建立彼此獨立的 wrapper;將結果與原生 structuredClone 進行比較。
由索引模型根據 Issue 內容生成。
描述
Description
The React Native structuredClone polyfill reconstructs Number, String, Boolean, and Date wrappers by passing the source object to a constructor. Number/String cloning invokes user coercion hooks, and new Boolean(new Boolean(false)) uses object truthiness and silently changes the internal value to true.
Expected behavior
Cloning should read each wrapper's internal primitive through the built-in valueOf intrinsic, create a distinct wrapper with the same value, and never execute user coercion. Native structuredClone follows this behavior.
React Native Version
0.87.1 and current main
Affected Platforms
JavaScript runtime - All
- 主要語言
- C++
- 星號
- 127k
- 分支
- 25.3k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
react/react-native 的其他 Issue
-
Needs: Author Feedback Needs: Repro
難度 2/5 1-3 小時 新手友好度 76/100
react/react-native#58952 · 1 則留言 ·
維護者通常 1 天內回覆
-
Needs: Attention Needs: Repro
難度 2/5 1-3 小時 新手友好度 78/100
react/react-native#58904 · 2 則留言 ·
維護者通常 1 天內回覆
-
Needs: Author Feedback Needs: Repro
難度 2/5 1-3 小時 新手友好度 75/100
react/react-native#58659 · 2 則留言 ·
維護者通常 1 天內回覆
-
Needs: Author Feedback Needs: Repro
難度 1/5 1 小時以內 新手友好度 92/100
react/react-native#58621 · 1 則留言 ·
維護者通常 1 天內回覆
-
Add TypeScript declaration for the performance global可能已有人在做 @Cedric921 於 8 天前認領。 未關閉Needs: Attention Needs: Repro
難度 2/5 1-3 小時 新手友好度 85/100
react/react-native#58610 · 4 則留言 ·
維護者通常 1 天內回覆
查看 react/react-native 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 86/100
AcademySoftwareFoundation/Imath#611 ·
維護者通常 1 天內回覆
-
bug intrinsic low priority rt_lib
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
The Outdated Version prompt shows the release tag as unescaped HTML可能已有人在做 @on8st 今天認領。 未關閉bug good first issue GUI maintainer-review priority: low
難度 2/5 1-3 小時 新手友好度 76/100
aethersdr/AetherSDR#6405 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
bitcoin-core/gui-qml#1003 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100