structuredClone coerces boxed primitives and flips false Boolean
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
React Native の structuredClone polyfill のエントリポイントから開始し、boxed Number、String、Boolean、Date の値で動作を再現します。clone がユーザーの coercion hook を実行せずに内部のプリミティブを読み取り、false の Boolean 値を保持し、別個の wrapper を作成することを確認します。結果を native structuredClone と比較します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100