Commit b587763
Pause RedBox auto-retry reload while app is backgrounded (#57593)
Summary:
Pull Request resolved: #57593
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
Reviewed By: shwanton
Differential Revision: D112543586
fbshipit-source-id: 17f0a7797c64ed312b3124138f4ec9edc10006c81 parent c086431 commit b587763
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