structuredClone loses own __proto__ data properties
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 127k
- Forks
- 25.3k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Description
The React Native structuredClone polyfill copies enumerable properties with ordinary assignment. For an own __proto__ data property on an object or array, assignment invokes the inherited prototype setter: the clone's prototype is replaced and no own property is created.
Expected behavior
__proto__ should be cloned as an ordinary own enumerable/writable/configurable data property with a deeply cloned value, while the clone keeps its normal Object or Array prototype. Native structuredClone follows this behavior.
React Native Version
0.87.1 and current main
Affected Platforms
JavaScript runtime - All
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Der Einstiegspunkt ist React Native's structuredClone-Polyfill; beginne damit, das Problem mit Objekten und Arrays zu reproduzieren, die eigene aufzählbare proto-Dateneigenschaften besitzen. Als abgeschlossen gilt die Änderung, wenn der Klon seinen normalen Object- oder Array-Prototyp beibehält und eine tief geklonte eigene Eigenschaft enthält, die dem Verhalten von structuredClone entspricht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react-native
- Bereich
- mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 58/100