mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Disable preallocation check on mount items
Summary: Ensures (under a flag) that CREATE instructions will be issued even if the node was supposed to be preallocated before from create or clone. This addresses cases when differ considers nodes to be deleted->created, but we skip the "create" part because of revision check. Changelog: [Internal] Disable node revision checks during mount under a flag Reviewed By: sammy-SC Differential Revision: D32440831 fbshipit-source-id: 4da8c4961fd7bc43c8f4166798bdfb5d897184e0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5dcad6a116
commit
1e7da82623
@@ -708,10 +708,12 @@ void Binding::schedulerDidFinishTransaction(
|
||||
|
||||
bool isVirtual = mutation.mutatedViewIsVirtual();
|
||||
|
||||
bool noRevisionCheck =
|
||||
disablePreallocateViews_ || disableRevisionCheckForPreallocation_;
|
||||
|
||||
switch (mutationType) {
|
||||
case ShadowViewMutation::Create: {
|
||||
if (disablePreallocateViews_ ||
|
||||
newChildShadowView.props->revision > 1) {
|
||||
if (noRevisionCheck || newChildShadowView.props->revision > 1) {
|
||||
cppCommonMountItems.push_back(
|
||||
CppMountItem::CreateMountItem(newChildShadowView));
|
||||
}
|
||||
@@ -772,8 +774,7 @@ void Binding::schedulerDidFinishTransaction(
|
||||
cppCommonMountItems.push_back(CppMountItem::InsertMountItem(
|
||||
parentShadowView, newChildShadowView, index));
|
||||
|
||||
if (disablePreallocateViews_ ||
|
||||
newChildShadowView.props->revision > 1) {
|
||||
if (noRevisionCheck || newChildShadowView.props->revision > 1) {
|
||||
cppUpdatePropsMountItems.push_back(
|
||||
CppMountItem::UpdatePropsMountItem(newChildShadowView));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user