MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / resetExpirationTime

Function resetExpirationTime

code/communication/public/app.js:13082–13103  ·  view source on GitHub ↗
(workInProgress, renderTime)

Source from the content-addressed store, hash-verified

13080 }
13081
13082 function resetExpirationTime(workInProgress, renderTime) {
13083 if (renderTime !== Never && workInProgress.expirationTime === Never) {
13084 // The children of this component are hidden. Don't bubble their
13085 // expiration times.
13086 return;
13087 }
13088
13089 // Check for pending updates.
13090 var newExpirationTime = getUpdateExpirationTime(workInProgress);
13091
13092 // TODO: Calls need to visit stateNode
13093
13094 // Bubble up the earliest expiration time.
13095 var child = workInProgress.child;
13096 while (child !== null) {
13097 if (child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > child.expirationTime)) {
13098 newExpirationTime = child.expirationTime;
13099 }
13100 child = child.sibling;
13101 }
13102 workInProgress.expirationTime = newExpirationTime;
13103 }
13104
13105 function completeUnitOfWork(workInProgress) {
13106 // Attempt to complete the current unit of work, then move to the

Callers 1

completeUnitOfWorkFunction · 0.70

Calls 1

getUpdateExpirationTimeFunction · 0.70

Tested by

no test coverage detected