Back out hacks to fix T83141606

Summary:
Original commit changeset: 3ed8e78e31b0

Backing-out D25938851 (https://github.com/facebook/react-native/commit/69b3016171bb2f994dd4a62c34c2c4645b5a7d56) and D25935785 (https://github.com/facebook/react-native/commit/bdea479a1faa0f1f7d7c9d9162212cce94bc9720). Based on analysis documented in T83141606, I believe this issue should be fixed in JS.

Additionally, this crash actually has nothing to do with (un)flattening or the differ; it is a side-effect of stale ShadowNodes being cloned, which I believe is either UB or a contract violation. Either way, it should probably be fixed either in JS, or in node cloning. So this isn't the right solution for this issue and should be reverted.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25949569

fbshipit-source-id: 8cf1094a767da98fff4430da60d223412e029545
This commit is contained in:
Joshua Gross
2021-01-19 00:29:41 -08:00
committed by Facebook GitHub Bot
parent 8facc865ab
commit 9b1f3b16b0
4 changed files with 11 additions and 19 deletions
@@ -553,7 +553,7 @@ void Binding::schedulerDidFinishTransaction(
switch (mutationType) {
case ShadowViewMutation::Create: {
if (disablePreallocateViews_ ||
newChildShadowView.props->revision > 1 || mutation.recreated) {
newChildShadowView.props->revision > 1) {
cppCommonMountItems.push_back(
CppMountItem::CreateMountItem(newChildShadowView));
}