Remove references to Deletion flag (#20623)

We no longer use the Deletion flag anywhere in the new fork, so we can
stop marking it.
This commit is contained in:
Andrew Clark
2021-01-20 10:18:19 -08:00
committed by GitHub
parent 2e948e0d91
commit 11a983fc76
3 changed files with 2 additions and 19 deletions
@@ -13,12 +13,7 @@ import type {Fiber} from './ReactInternalTypes';
import type {Lanes} from './ReactFiberLane.new';
import getComponentName from 'shared/getComponentName';
import {
Deletion,
ChildDeletion,
Placement,
StaticMask,
} from './ReactFiberFlags';
import {Placement, ChildDeletion} from './ReactFiberFlags';
import {
getIteratorFn,
REACT_ELEMENT_TYPE,
@@ -281,7 +276,6 @@ function ChildReconciler(shouldTrackSideEffects) {
returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
}
childToDelete.nextEffect = null;
childToDelete.flags = (childToDelete.flags & StaticMask) | Deletion;
const deletions = returnFiber.deletions;
if (deletions === null) {
@@ -67,7 +67,6 @@ import {
DidCapture,
Update,
Ref,
Deletion,
ChildDeletion,
ForceUpdateForLegacySuspense,
StaticMask,
@@ -2200,8 +2199,6 @@ function updateSuspensePrimaryChildren(
if (currentFallbackChildFragment !== null) {
// Delete the fallback child fragment
currentFallbackChildFragment.nextEffect = null;
currentFallbackChildFragment.flags =
(currentFallbackChildFragment.flags & StaticMask) | Deletion;
workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
const deletions = workInProgress.deletions;
if (deletions === null) {
@@ -3191,7 +3188,6 @@ function remountFiber(
returnFiber.firstEffect = returnFiber.lastEffect = current;
}
current.nextEffect = null;
current.flags = (current.flags & StaticMask) | Deletion;
const deletions = returnFiber.deletions;
if (deletions === null) {
@@ -24,13 +24,7 @@ import {
HostRoot,
SuspenseComponent,
} from './ReactWorkTags';
import {
Deletion,
ChildDeletion,
Placement,
Hydrating,
StaticMask,
} from './ReactFiberFlags';
import {ChildDeletion, Placement, Hydrating} from './ReactFiberFlags';
import invariant from 'shared/invariant';
import {
@@ -130,7 +124,6 @@ function deleteHydratableInstance(
const childToDelete = createFiberFromHostInstanceForDeletion();
childToDelete.stateNode = instance;
childToDelete.return = returnFiber;
childToDelete.flags = (childToDelete.flags & StaticMask) | Deletion;
// This might seem like it belongs on progressedFirstDeletion. However,
// these children are not part of the reconciliation list of children.