Clear more Fiber fields in detachFiber (#18556)

This commit is contained in:
Dominic Gannaway
2020-04-09 18:31:34 +01:00
committed by GitHub
parent 0566b706ee
commit d48dbb8249
2 changed files with 8 additions and 0 deletions
@@ -1118,6 +1118,7 @@ function detachFiber(fiber: Fiber) {
// itself will be GC:ed when the parent updates the next time.
fiber.return = null;
fiber.child = null;
fiber.sibling = null;
fiber.memoizedState = null;
fiber.updateQueue = null;
fiber.dependencies = null;
@@ -1127,6 +1128,9 @@ function detachFiber(fiber: Fiber) {
fiber.pendingProps = null;
fiber.memoizedProps = null;
fiber.stateNode = null;
if (__DEV__) {
fiber._debugOwner = null;
}
}
function emptyPortalContainer(current: Fiber) {
@@ -1118,6 +1118,7 @@ function detachFiber(fiber: Fiber) {
// itself will be GC:ed when the parent updates the next time.
fiber.return = null;
fiber.child = null;
fiber.sibling = null;
fiber.memoizedState = null;
fiber.updateQueue = null;
fiber.dependencies = null;
@@ -1127,6 +1128,9 @@ function detachFiber(fiber: Fiber) {
fiber.pendingProps = null;
fiber.memoizedProps = null;
fiber.stateNode = null;
if (__DEV__) {
fiber._debugOwner = null;
}
}
function emptyPortalContainer(current: Fiber) {