structuredClone coerces rejected values while creating DataCloneError
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
The React Native structuredClone polyfill interpolates rejected values into its error message. That invokes user-defined coercion such as Symbol.toPrimitive; a non-cloneable function or WeakMap can therefore replace the required DataCloneError with an arbitrary user-thrown error.
Expected behavior
Rejecting an unsupported value should produce DOMException / DataCloneError without executing user coercion hooks. The non-standard message does not need to include the rejected value.
React Native Version
0.87.1 and current main
Affected Platforms
JavaScript runtime - All
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず React Native の structuredClone polyfill と DataCloneError を生成する経路を特定し、次に Symbol.toPrimitive が例外をスローする拒否された値で問題を再現します。未対応の値が、ユーザー定義の型強制を呼び出すことなく、一貫して DOMException/DataCloneError を生成すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react-native
- 領域
- mobile-dev
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 65/100