Skip to content

Ignore image progress that arrives after the request finished - #60404

Open
felixweilbach wants to merge 1 commit into
react:mainfrom
felixweilbach:export-D135046959
Open

felixweilbach wants to merge 1 commit into
react:mainfrom
felixweilbach:export-D135046959

Conversation

@felixweilbach

Copy link
Copy Markdown

Summary:
On iOS and macOS, an image request reports progress and completion from different threads, so a progress callback can arrive after the request has already completed or failed. ImageResponseObserverCoordinator::nativeImageResponseProgress asserted that the request was still loading, so in debug builds such a late callback aborted the app. It is likeliest with images reloaded many times a second from a local HTTP server.

A late progress callback is now dropped: there is nothing left to report once the request has finished. Completion after cancellation was allowed the same way before; this covers progress after completion or failure.

Changelog:
[General][Fixed] - Fix a debug-build crash when image progress arrives after the image finished loading

Differential Revision: D135046959

Summary:
On iOS and macOS, an image request reports progress and completion from different threads, so a progress callback can arrive after the request has already completed or failed. `ImageResponseObserverCoordinator::nativeImageResponseProgress` asserted that the request was still loading, so in debug builds such a late callback aborted the app. It is likeliest with images reloaded many times a second from a local HTTP server.

A late progress callback is now dropped: there is nothing left to report once the request has finished. Completion after cancellation was allowed the same way before; this covers progress after completion or failure.

Changelog:
[General][Fixed] - Fix a debug-build crash when image progress arrives after the image finished loading

Differential Revision: D135046959
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 30, 2026
@meta-codesync

meta-codesync Bot commented Nov 30, 2026

Copy link
Copy Markdown

@felixweilbach has exported this pull request. If you are a Meta employee, you can view the originating Diff in D135046959.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant