From cd13a7d09bdd698991bc8cd0d4a8ef0a4066656a Mon Sep 17 00:00:00 2001 From: cchaonie Date: Thu, 22 Dec 2022 17:29:06 +0800 Subject: [PATCH] Refactor: remove useless parameter --- packages/react-reconciler/src/ReactFiberLane.js | 6 +----- packages/react-reconciler/src/ReactFiberWorkLoop.js | 5 ++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberLane.js b/packages/react-reconciler/src/ReactFiberLane.js index 97a28f88099e0..d470168cef6f3 100644 --- a/packages/react-reconciler/src/ReactFiberLane.js +++ b/packages/react-reconciler/src/ReactFiberLane.js @@ -638,11 +638,7 @@ export function markRootSuspended(root: FiberRoot, suspendedLanes: Lanes) { } } -export function markRootPinged( - root: FiberRoot, - pingedLanes: Lanes, - eventTime: number, -) { +export function markRootPinged(root: FiberRoot, pingedLanes: Lanes) { root.pingedLanes |= root.suspendedLanes & pingedLanes; } diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index 7d5a38ad393d5..7716e7b7b2bd3 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -1306,8 +1306,7 @@ function finishConcurrentRender(root, exitStatus, lanes) { // suspended level. Ping the last suspended level to try // rendering it again. // FIXME: What if the suspended lanes are Idle? Should not restart. - const eventTime = requestEventTime(); - markRootPinged(root, suspendedLanes, eventTime); + markRootPinged(root, suspendedLanes); break; } @@ -3379,7 +3378,7 @@ function pingSuspendedRoot( } const eventTime = requestEventTime(); - markRootPinged(root, pingedLanes, eventTime); + markRootPinged(root, pingedLanes); warnIfSuspenseResolutionNotWrappedWithActDEV(root);