Description
PerformanceObserver stores its constructor argument without validating that one was supplied or that it is callable. Missing, null, and other non-function callbacks therefore create invalid observer instances and fail only later when native delivery attempts to invoke the value.
Expected behavior
Construction without the required argument should throw synchronously, and an explicitly supplied non-function should throw the corresponding callback type error, matching the PerformanceObserver API contract.
React Native Version
0.87.1 and current main
Affected Platforms
New Architecture - All
Description
PerformanceObserverstores its constructor argument without validating that one was supplied or that it is callable. Missing, null, and other non-function callbacks therefore create invalid observer instances and fail only later when native delivery attempts to invoke the value.Expected behavior
Construction without the required argument should throw synchronously, and an explicitly supplied non-function should throw the corresponding callback type error, matching the PerformanceObserver API contract.
React Native Version
0.87.1 and current main
Affected Platforms
New Architecture - All