MCPcopy Create free account
hub / github.com/microsoft/SandDance / scheduleWorkOnParentPath

Function scheduleWorkOnParentPath

docs/external/js/react-dom.development.js:12080–12104  ·  view source on GitHub ↗
(parent, renderExpirationTime)

Source from the content-addressed store, hash-verified

12078 }
12079 }
12080 function scheduleWorkOnParentPath(parent, renderExpirationTime) {
12081 // Update the child expiration time of all the ancestors, including
12082 // the alternates.
12083 var node = parent;
12084
12085 while (node !== null) {
12086 var alternate = node.alternate;
12087
12088 if (node.childExpirationTime < renderExpirationTime) {
12089 node.childExpirationTime = renderExpirationTime;
12090
12091 if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
12092 alternate.childExpirationTime = renderExpirationTime;
12093 }
12094 } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
12095 alternate.childExpirationTime = renderExpirationTime;
12096 } else {
12097 // Neither alternate was updated, which means the rest of the
12098 // ancestor path already has sufficient priority.
12099 break;
12100 }
12101
12102 node = node.return;
12103 }
12104 }
12105 function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
12106 var fiber = workInProgress.child;
12107

Callers 2

propagateContextChangeFunction · 0.85
scheduleWorkOnFiberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected