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

Function flushSyncWorkAcrossRoots_impl

docs/index.js:14833–14875  ·  view source on GitHub ↗
(syncTransitionLanes, onlyLegacy)

Source from the content-addressed store, hash-verified

14831 scheduleImmediateTask(processRootScheduleInMicrotask));
14832}
14833function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
14834 if (!isFlushingWork && mightHavePendingSyncWork) {
14835 isFlushingWork = !0;
14836 do {
14837 var didPerformSomeWork = !1;
14838 for (var root$172 = firstScheduledRoot; null !== root$172; ) {
14839 if (!onlyLegacy)
14840 if (0 !== syncTransitionLanes) {
14841 var pendingLanes = root$172.pendingLanes;
14842 if (0 === pendingLanes) var JSCompiler_inline_result = 0;
14843 else {
14844 var suspendedLanes = root$172.suspendedLanes,
14845 pingedLanes = root$172.pingedLanes;
14846 JSCompiler_inline_result =
14847 (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;
14848 JSCompiler_inline_result &=
14849 pendingLanes & ~(suspendedLanes & ~pingedLanes);
14850 JSCompiler_inline_result =
14851 JSCompiler_inline_result & 201326677
14852 ? (JSCompiler_inline_result & 201326677) | 1
14853 : JSCompiler_inline_result
14854 ? JSCompiler_inline_result | 2
14855 : 0;
14856 }
14857 0 !== JSCompiler_inline_result &&
14858 ((didPerformSomeWork = !0),
14859 performSyncWorkOnRoot(root$172, JSCompiler_inline_result));
14860 } else
14861 (JSCompiler_inline_result = workInProgressRootRenderLanes),
14862 (JSCompiler_inline_result = getNextLanes(
14863 root$172,
14864 root$172 === workInProgressRoot ? JSCompiler_inline_result : 0
14865 )),
14866 0 === (JSCompiler_inline_result & 3) ||
14867 checkIfRootIsPrerendering(root$172, JSCompiler_inline_result) ||
14868 ((didPerformSomeWork = !0),
14869 performSyncWorkOnRoot(root$172, JSCompiler_inline_result));
14870 root$172 = root$172.next;
14871 }
14872 } while (didPerformSomeWork);
14873 isFlushingWork = !1;
14874 }
14875}
14876function processRootScheduleInMicrotask() {
14877 mightHavePendingSyncWork = didScheduleMicrotask = !1;
14878 var syncTransitionLanes = 0;

Callers 5

flushSyncWork$1Function · 0.85
commitRootImplFunction · 0.85
flushPassiveEffectsFunction · 0.85
dispatchEventFunction · 0.85

Calls 3

performSyncWorkOnRootFunction · 0.85
getNextLanesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…