MCPcopy Index your code
hub / github.com/caseywebdev/react-list / flushPassiveEffects

Function flushPassiveEffects

docs/index.js:14654–14699  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14652 ((root.pooledCache = null), releaseCache(remainingLanes)));
14653}
14654function flushPassiveEffects() {
14655 if (null !== rootWithPendingPassiveEffects) {
14656 var root$170 = rootWithPendingPassiveEffects,
14657 remainingLanes = pendingPassiveEffectsRemainingLanes;
14658 pendingPassiveEffectsRemainingLanes = 0;
14659 var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
14660 prevTransition = ReactSharedInternals.T,
14661 previousPriority = ReactDOMSharedInternals.p;
14662 try {
14663 ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
14664 ReactSharedInternals.T = null;
14665 if (null === rootWithPendingPassiveEffects)
14666 var JSCompiler_inline_result = !1;
14667 else {
14668 renderPriority = pendingPassiveTransitions;
14669 pendingPassiveTransitions = null;
14670 var root = rootWithPendingPassiveEffects,
14671 lanes = pendingPassiveEffectsLanes;
14672 rootWithPendingPassiveEffects = null;
14673 pendingPassiveEffectsLanes = 0;
14674 if (0 !== (executionContext & 6))
14675 throw Error(formatProdErrorMessage(331));
14676 var prevExecutionContext = executionContext;
14677 executionContext |= 4;
14678 commitPassiveUnmountOnFiber(root.current);
14679 commitPassiveMountOnFiber(root, root.current, lanes, renderPriority);
14680 executionContext = prevExecutionContext;
14681 flushSyncWorkAcrossRoots_impl(0, !1);
14682 if (
14683 injectedHook &&
14684 "function" === typeof injectedHook.onPostCommitFiberRoot
14685 )
14686 try {
14687 injectedHook.onPostCommitFiberRoot(rendererID, root);
14688 } catch (err) {}
14689 JSCompiler_inline_result = !0;
14690 }
14691 return JSCompiler_inline_result;
14692 } finally {
14693 (ReactDOMSharedInternals.p = previousPriority),
14694 (ReactSharedInternals.T = prevTransition),
14695 releaseRootPooledCache(root$170, remainingLanes);
14696 }
14697 }
14698 return !1;
14699}
14700function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
14701 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
14702 sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);

Callers 6

commitRootImplFunction · 0.85
performSyncWorkOnRootFunction · 0.85
index.jsFile · 0.85
scheduleRefreshFunction · 0.85
updateContainerSyncFunction · 0.85

Calls 7

lanesToEventPriorityFunction · 0.85
formatProdErrorMessageFunction · 0.85
releaseRootPooledCacheFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…