Skip to content

Commit 69e4252

Browse files
javachefacebook-github-bot
authored andcommitted
Fix access to observers outside lock in ImageResponseObserverCoordinator (#52346)
Summary: Pull Request resolved: #52346 This is bypassing the mutex, and potentially not thread-safe. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D77541041 fbshipit-source-id: f97415d066786864806836768dbce2d5e68487ef
1 parent 69a55d7 commit 69e4252

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void ImageResponseObserverCoordinator::nativeImageResponseComplete(
9595
auto observers = observers_;
9696
mutex_.unlock();
9797

98-
for (auto observer : observers_) {
98+
for (auto observer : observers) {
9999
observer->didReceiveImage(imageResponse);
100100
}
101101
}

0 commit comments

Comments
 (0)