Fix access to observers outside lock in ImageResponseObserverCoordinator (#52346)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52346

This is bypassing the mutex, and potentially not thread-safe.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D77541041

fbshipit-source-id: f97415d066786864806836768dbce2d5e68487ef
This commit is contained in:
Pieter De Baets
2025-06-30 13:22:36 -07:00
committed by Facebook GitHub Bot
parent 69a55d7b76
commit 69e4252ccb
@@ -95,7 +95,7 @@ void ImageResponseObserverCoordinator::nativeImageResponseComplete(
auto observers = observers_;
mutex_.unlock();
for (auto observer : observers_) {
for (auto observer : observers) {
observer->didReceiveImage(imageResponse);
}
}