Description
The React Native structuredClone polyfill correctly rejects primitive Symbols but treats boxed Symbols as arbitrary objects. structuredClone(Object(Symbol())) therefore returns {} instead of throwing, even though boxed Symbols are also not structured-cloneable.
Expected behavior
Boxed Symbols should throw DataCloneError, matching native structuredClone. The error path should not string-coerce the wrapper because Hermes throws a separate TypeError for that coercion.
React Native Version
0.87.1 and current main
Affected Platforms
JavaScript runtime - All
Description
The React Native
structuredClonepolyfill correctly rejects primitive Symbols but treats boxed Symbols as arbitrary objects.structuredClone(Object(Symbol()))therefore returns{}instead of throwing, even though boxed Symbols are also not structured-cloneable.Expected behavior
Boxed Symbols should throw
DataCloneError, matching nativestructuredClone. The error path should not string-coerce the wrapper because Hermes throws a separate TypeError for that coercion.React Native Version
0.87.1 and current main
Affected Platforms
JavaScript runtime - All