Commit f00795d
Prevent NPE in measure during measure/teardown race
Summary:
When stopSurface is called, Fabric might be processing a commit and performing measurements even as the context is being removed from the FabricUIManager map.
Just return a 0 from `measure` if we can't get a context. This prevents crashes during teardown for measured views that will never be visible anyway.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D22604716
fbshipit-source-id: 67be8d272afd35fc4c2b51b371939c5623e97f731 parent ee8a0cf commit f00795d
File tree
1 file changed
+11
-0
lines changed- ReactAndroid/src/main/java/com/facebook/react/fabric
1 file changed
+11
-0
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
469 | 474 | | |
470 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
471 | 482 | | |
472 | 483 | | |
473 | 484 | | |
| |||
0 commit comments