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

Function resetExpirationTime

code/third-party/public/app.js:12280–12301  ·  view source on GitHub ↗
(workInProgress, renderTime)

Source from the content-addressed store, hash-verified

12278 }
12279
12280 function resetExpirationTime(workInProgress, renderTime) {
12281 if (renderTime !== Never && workInProgress.expirationTime === Never) {
12282 // The children of this component are hidden. Don't bubble their
12283 // expiration times.
12284 return;
12285 }
12286
12287 // Check for pending updates.
12288 var newExpirationTime = getUpdateExpirationTime(workInProgress);
12289
12290 // TODO: Calls need to visit stateNode
12291
12292 // Bubble up the earliest expiration time.
12293 var child = workInProgress.child;
12294 while (child !== null) {
12295 if (child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > child.expirationTime)) {
12296 newExpirationTime = child.expirationTime;
12297 }
12298 child = child.sibling;
12299 }
12300 workInProgress.expirationTime = newExpirationTime;
12301 }
12302
12303 function completeUnitOfWork(workInProgress) {
12304 // 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