react
react copied to clipboard
Add readTypeof helper to `ReactPerformanceTrackProperties`
fix #34840
Summary
ReactPerformanceTrackProperties tries to read $$typeof on every object which may throw.
Wrap reading $$typeof in try/catch for ReactPerformanceTrackProperties.
Would love to see this fix land 🙏🏼
This has causing a regression when running a React app in dev mode in an iframe, and app passes window as a prop.
Uncaught SecurityError: Failed to read a named property ‘$$typeof’ from ‘Window’: Blocked a frame with origin “https://foo.com” from accessing a frame with origin “https://www.bar.com/”. Protocols, domains, and ports must match.
Hi! Any chance this PR will be merged or another fix applied? Thanks