MCPcopy Create free account
hub / github.com/reactjs/react-rails / prepareFreshStack

Function prepareFreshStack

lib/assets/react-source/development/react.js:25631–25671  ·  view source on GitHub ↗
(root, expirationTime)

Source from the content-addressed store, hash-verified

25629 }
25630
25631 function prepareFreshStack(root, expirationTime) {
25632 root.finishedWork = null;
25633 root.finishedExpirationTime = NoWork;
25634 var timeoutHandle = root.timeoutHandle;
25635
25636 if (timeoutHandle !== noTimeout) {
25637 // The root previous suspended and scheduled a timeout to commit a fallback
25638 // state. Now that we have additional work, cancel the timeout.
25639 root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
25640
25641 cancelTimeout(timeoutHandle);
25642 }
25643
25644 if (workInProgress !== null) {
25645 var interruptedWork = workInProgress.return;
25646
25647 while (interruptedWork !== null) {
25648 unwindInterruptedWork(interruptedWork);
25649 interruptedWork = interruptedWork.return;
25650 }
25651 }
25652
25653 workInProgressRoot = root;
25654 workInProgress = createWorkInProgress(root.current, null);
25655 renderExpirationTime$1 = expirationTime;
25656 workInProgressRootExitStatus = RootIncomplete;
25657 workInProgressRootFatalError = null;
25658 workInProgressRootLatestProcessedExpirationTime = Sync;
25659 workInProgressRootLatestSuspenseTimeout = Sync;
25660 workInProgressRootCanSuspendUsingConfig = null;
25661 workInProgressRootNextUnprocessedUpdateTime = NoWork;
25662 workInProgressRootHasPendingPing = false;
25663
25664 {
25665 spawnedWorkDuringRender = null;
25666 }
25667
25668 {
25669 ReactStrictModeWarnings.discardPendingWarnings();
25670 }
25671 }
25672
25673 function handleError(root, thrownValue) {
25674 do {

Callers 4

finishConcurrentRenderFunction · 0.85
performSyncWorkOnRootFunction · 0.85
pingSuspendedRootFunction · 0.85

Calls 2

unwindInterruptedWorkFunction · 0.85
createWorkInProgressFunction · 0.85

Tested by

no test coverage detected