Commit fc494cd
Fix mobile WebView crash: stop RAF loop when hidden, cap animation buffers
- animatePulse RAF loop now fully stops when document.hidden instead of
spinning idle frames; visibilitychange listener restarts it on resume
- Cap tradeFlashesRef (100), overlayBurstRef (200), closedAnimsRef (100),
newMarketAnimRef (100) to prevent unbounded memory growth
- Root cause of Binance/OKX wallet browser "site can't be reached" after
a few minutes: animation refs grew indefinitely + RAF allocated GeoJSON
objects every frame even when page was backgrounded
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent aa18043 commit fc494cd
1 file changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
641 | 651 | | |
642 | 652 | | |
643 | 653 | | |
| |||
1692 | 1702 | | |
1693 | 1703 | | |
1694 | 1704 | | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
1695 | 1710 | | |
1696 | 1711 | | |
1697 | 1712 | | |
| |||
1802 | 1817 | | |
1803 | 1818 | | |
1804 | 1819 | | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
1805 | 1825 | | |
1806 | 1826 | | |
1807 | 1827 | | |
| |||
1826 | 1846 | | |
1827 | 1847 | | |
1828 | 1848 | | |
| 1849 | + | |
| 1850 | + | |
1829 | 1851 | | |
1830 | 1852 | | |
1831 | 1853 | | |
| |||
1874 | 1896 | | |
1875 | 1897 | | |
1876 | 1898 | | |
| 1899 | + | |
| 1900 | + | |
1877 | 1901 | | |
1878 | 1902 | | |
1879 | 1903 | | |
| |||
0 commit comments