Commit e5ee39c
Pause RedBox auto-retry reload while app is backgrounded (#57593)
Summary:
The RedBox auto-retry timer could fire a reload while the app was in the
background. That reload restarts the instance and re-initializes native
modules; a module requiring main-queue setup is dispatched synchronously onto
the main queue, which is itself blocked inside the reload, deadlocking the app
until the watchdog terminates it.
Gate the countdown in `autoRetryTick` on foreground state, so the timer only
advances (and eventually reloads) while the app is active. In app extensions
`RCTSharedApplication()` is nil, which reads as active and preserves the prior
behavior.
Changelog:
[iOS][Fixed] - Prevent RedBox auto-retry from reloading while backgrounded
Differential Revision: D1125435861 parent 7825d51 commit e5ee39c
1 file changed
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
| |||
0 commit comments