Commit f51d6ec
fix bug in reparenting where wrong parentTag is used in differentiator (facebook#50884)
Summary:
Pull Request resolved: facebook#50884
changelog: [internal]
Fix incorrect parentTag coming from differentiator when reparenting. The fix is hidden behind existing feature flag that is already fixing similar issue: D73428312
The problem occurs under very specific circumstances that are covered by an integration test. The *parentTag* is also [only used on Android](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp#L566) and only if layout changes as part of the update.
This diff introduces a new test specifically triggering the incorrect behaviour: `Differentiator-itest.js`. Without this fix, the test fails on following assert: [react_native_assert(hasTag(mutation.parentTag))](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp#L245).
Reviewed By: mdvacca
Differential Revision: D73545165
fbshipit-source-id: 43344eebfa4cc0119e5b42170f6b9097dacd704d1 parent d28d4c5 commit f51d6ec
File tree
2 files changed
+62
-1
lines changed- packages/react-native
- ReactCommon/react/renderer/mounting
- src/private/renderer/mounting/__tests__
2 files changed
+62
-1
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
714 | 719 | | |
715 | 720 | | |
716 | 721 | | |
| |||
727 | 732 | | |
728 | 733 | | |
729 | 734 | | |
730 | | - | |
| 735 | + | |
731 | 736 | | |
732 | 737 | | |
733 | 738 | | |
| |||
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
298 | 354 | | |
299 | 355 | | |
300 | 356 | | |
| |||
0 commit comments