diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index 0bd952155c5f4..7930ff7bf5764 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.0.0-native-fb-a5a7f106-20240910 \ No newline at end of file +19.0.0-native-fb-d6cb4e77-20240911 \ No newline at end of file diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index 0eb6df5b3e27f..87fddf72d8ab5 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,13 +7,13 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8f1af1317adb530cf5e93c6d98166d09>> + * @generated SignedSource<> */ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1103() { + function JSCompiler_object_inline_createNodeMock_1105() { return null; } function findHook(fiber, id) { @@ -855,8 +855,9 @@ __DEV__ && if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -865,26 +866,28 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -958,8 +961,15 @@ __DEV__ && for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } - function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -968,16 +978,17 @@ __DEV__ && root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index = 31 - clz32(noLongerPendingLanes), + var index = 31 - clz32(remainingLanes), lane = 1 << index; - remainingLanes[index] = 0; + entanglements[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -989,9 +1000,13 @@ __DEV__ && var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -7902,12 +7917,12 @@ __DEV__ && : { parent: CacheContext._currentValue2, pool: cacheFromPool }; } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -10724,8 +10739,6 @@ __DEV__ && ); break; } - root.finishedWork = shouldTimeSlice; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (didTimeout) { @@ -10752,13 +10765,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = shouldTimeSlice; + renderWasConcurrent.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( renderWasConcurrent, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); else { if ( @@ -10787,6 +10804,8 @@ __DEV__ && workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), didTimeout @@ -10801,6 +10820,8 @@ __DEV__ && workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ); } @@ -10853,7 +10874,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -10863,31 +10886,33 @@ __DEV__ && recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$31) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error$31) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -10979,7 +11004,9 @@ __DEV__ && workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -11048,7 +11075,8 @@ __DEV__ && workInProgressRootDidAttachPingListener = workInProgressRootDidSkipSuspendedSiblings = !1; workInProgressRootExitStatus = RootInProgress; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -11200,9 +11228,10 @@ __DEV__ && null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = NotSuspended), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, unitOfWork, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = NotSuspended; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); @@ -11254,7 +11283,12 @@ __DEV__ && case SuspendedOnError: workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop( + root, + lanes, + thrownValue, + SuspendedOnError + ); break; case SuspendedOnData: if (isThenableResolved(thrownValue)) { @@ -11286,7 +11320,12 @@ __DEV__ && replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = NotSuspended), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, thrownValue)); + throwAndUnwindWorkLoop( + root, + lanes, + thrownValue, + SuspendedAndReadyToContinue + )); break; case SuspendedOnInstanceAndReadyToContinue: var resource = null; @@ -11318,12 +11357,22 @@ __DEV__ && } workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop( + root, + lanes, + thrownValue, + SuspendedOnInstanceAndReadyToContinue + ); break; case SuspendedOnDeprecatedThrowPromise: workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop( + root, + lanes, + thrownValue, + SuspendedOnDeprecatedThrowPromise + ); break; case SuspendedOnHydration: resetWorkInProgressStack(); @@ -11556,7 +11605,9 @@ __DEV__ && recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -11569,7 +11620,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -11583,7 +11636,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11612,7 +11667,14 @@ __DEV__ && root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11628,31 +11690,31 @@ __DEV__ && return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = DiscreteEventPriority; - var prevExecutionContext = executionContext; - executionContext |= CommitContext; - commitBeforeMutationEffects(root, finishedWork); - commitTime = now(); - commitMutationEffectsOnFiber(finishedWork, root); - root.current = finishedWork; - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes); - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else (root.current = finishedWork), (commitTime = now()); + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = DiscreteEventPriority), + (updatedLanes = executionContext), + (executionContext |= CommitContext), + commitBeforeMutationEffects(root, finishedWork), + (commitTime = now()), + commitMutationEffectsOnFiber(finishedWork, root), + (root.current = finishedWork), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes), + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : ((root.current = finishedWork), (commitTime = now())); (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -11950,7 +12012,9 @@ __DEV__ && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) ? (executionContext & RenderContext) === NoContext && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -14815,6 +14879,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -15057,11 +15122,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910" + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15083,7 +15148,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1103, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1105, isConcurrent = !1, isStrictMode = !1; "object" === typeof options && @@ -15206,5 +15271,5 @@ __DEV__ && flushSyncWorkAcrossRoots_impl(0, !0)); } }; - exports.version = "19.0.0-native-fb-a5a7f106-20240910"; + exports.version = "19.0.0-native-fb-d6cb4e77-20240911"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index 416a96316bbc5..f70255648f8b1 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -538,8 +538,9 @@ function getNextLanes(root, wipLanes) { if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -548,26 +549,28 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -633,8 +636,15 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; +function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes +) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -643,16 +653,17 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index$7 = 31 - clz32(noLongerPendingLanes), + var index$7 = 31 - clz32(remainingLanes), lane = 1 << index$7; - remainingLanes[index$7] = 0; + entanglements[index$7] = 0; expirationTimes[index$7] = -1; var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) @@ -664,9 +675,13 @@ function markRootFinished(root, remainingLanes, spawnedLane) { var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -5659,12 +5674,12 @@ function getSuspendedCache() { : { parent: CacheContext._currentValue2, pool: cacheFromPool }; } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -7643,6 +7658,7 @@ var DefaultAsyncDispatcher = { workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -7775,8 +7791,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { ); break; } - root.finishedWork = didTimeout; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (exitStatus) { @@ -7803,6 +7817,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = didTimeout; + renderWasConcurrent.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && 3 === exitStatus && @@ -7826,6 +7842,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), exitStatus @@ -7839,7 +7857,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); } } @@ -7889,7 +7909,9 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -7899,31 +7921,33 @@ function commitRootWhenReady( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -8010,7 +8034,9 @@ function performSyncWorkOnRoot(root, lanes) { workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -8068,7 +8094,8 @@ function prepareFreshStack(root, lanes) { workInProgressThrownValue = null; workInProgressRootDidAttachPingListener = workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -8179,9 +8206,10 @@ function renderRootSync(root, lanes) { null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = 0), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, unitOfWork, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); @@ -8225,7 +8253,7 @@ function renderRootConcurrent(root, lanes) { case 1: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 1); break; case 2: if (isThenableResolved(thrownValue)) { @@ -8255,7 +8283,7 @@ function renderRootConcurrent(root, lanes) { replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = 0), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, thrownValue)); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 7)); break; case 5: var resource = null; @@ -8282,12 +8310,12 @@ function renderRootConcurrent(root, lanes) { } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 5); break; case 6: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 6); break; case 8: resetWorkInProgressStack(); @@ -8459,7 +8487,9 @@ function commitRoot( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -8472,7 +8502,9 @@ function commitRoot( transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -8486,7 +8518,9 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -8506,7 +8540,14 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -8522,22 +8563,22 @@ function commitRootImpl( return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = 2; - var prevExecutionContext = executionContext; - executionContext |= 4; - commitBeforeMutationEffects(root, finishedWork); - commitMutationEffectsOnFiber(finishedWork, root); - root.current = finishedWork; - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else root.current = finishedWork; + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = 2), + (updatedLanes = executionContext), + (executionContext |= 4), + commitBeforeMutationEffects(root, finishedWork), + commitMutationEffectsOnFiber(finishedWork, root), + (root.current = finishedWork), + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : (root.current = finishedWork); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -8707,7 +8748,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { workInProgressRootRenderLanes && 300 > now() - globalMostRecentFallbackTime) ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -9443,28 +9486,28 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var internals$jscomp$inline_1264 = { +var internals$jscomp$inline_1266 = { bundleType: 0, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function (mockNode) { mockNode = nodeToInstanceMap.get(mockNode); return void 0 !== mockNode ? mockNode.internalInstanceHandle : null; }, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910" + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1265 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1267 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1265.isDisabled && - hook$jscomp$inline_1265.supportsFiber + !hook$jscomp$inline_1267.isDisabled && + hook$jscomp$inline_1267.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1265.inject( - internals$jscomp$inline_1264 + (rendererID = hook$jscomp$inline_1267.inject( + internals$jscomp$inline_1266 )), - (injectedHook = hook$jscomp$inline_1265); + (injectedHook = hook$jscomp$inline_1267); } catch (err) {} } exports._Scheduler = Scheduler; @@ -9588,4 +9631,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.0.0-native-fb-a5a7f106-20240910"; +exports.version = "19.0.0-native-fb-d6cb4e77-20240911"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 70c2e45af97cc..eac5db840787d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<34bf2e90c5560d580e7ce54b20ce9401>> + * @generated SignedSource<<4153f4020f989abe56d39fd033419f88>> */ "use strict"; @@ -615,8 +615,9 @@ function getNextLanes(root, wipLanes) { if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -625,26 +626,28 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -710,8 +713,15 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; +function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes +) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -720,16 +730,17 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index$7 = 31 - clz32(noLongerPendingLanes), + var index$7 = 31 - clz32(remainingLanes), lane = 1 << index$7; - remainingLanes[index$7] = 0; + entanglements[index$7] = 0; expirationTimes[index$7] = -1; var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) @@ -741,9 +752,13 @@ function markRootFinished(root, remainingLanes, spawnedLane) { var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -5843,12 +5858,12 @@ function getSuspendedCache() { : { parent: CacheContext._currentValue2, pool: cacheFromPool }; } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -8082,6 +8097,7 @@ var DefaultAsyncDispatcher = { workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -8216,8 +8232,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { ); break; } - root.finishedWork = didTimeout; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (exitStatus) { @@ -8244,6 +8258,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = didTimeout; + renderWasConcurrent.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && 3 === exitStatus && @@ -8267,6 +8283,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), exitStatus @@ -8280,7 +8298,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); } } @@ -8330,7 +8350,9 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -8340,31 +8362,33 @@ function commitRootWhenReady( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -8453,7 +8477,9 @@ function performSyncWorkOnRoot(root, lanes) { workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -8511,7 +8537,8 @@ function prepareFreshStack(root, lanes) { workInProgressThrownValue = null; workInProgressRootDidAttachPingListener = workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -8652,9 +8679,10 @@ function renderRootSync(root, lanes) { null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = 0), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, unitOfWork, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); @@ -8700,7 +8728,7 @@ function renderRootConcurrent(root, lanes) { case 1: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 1); break; case 2: if (isThenableResolved(thrownValue)) { @@ -8730,7 +8758,7 @@ function renderRootConcurrent(root, lanes) { replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = 0), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, thrownValue)); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 7)); break; case 5: var resource = null; @@ -8757,12 +8785,12 @@ function renderRootConcurrent(root, lanes) { } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 5); break; case 6: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 6); break; case 8: resetWorkInProgressStack(); @@ -8960,7 +8988,9 @@ function commitRoot( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -8973,7 +9003,9 @@ function commitRoot( transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -8987,7 +9019,9 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -9010,7 +9044,14 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -9026,29 +9067,29 @@ function commitRootImpl( return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = 2; - var prevExecutionContext = executionContext; - executionContext |= 4; - commitBeforeMutationEffects(root, finishedWork); - commitTime = now(); - commitMutationEffectsOnFiber(finishedWork, root); - root.current = finishedWork; - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes); - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else (root.current = finishedWork), (commitTime = now()); + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = 2), + (updatedLanes = executionContext), + (executionContext |= 4), + commitBeforeMutationEffects(root, finishedWork), + (commitTime = now()), + commitMutationEffectsOnFiber(finishedWork, root), + (root.current = finishedWork), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes), + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : ((root.current = finishedWork), (commitTime = now())); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -9278,7 +9319,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { workInProgressRootRenderLanes && 300 > now$1() - globalMostRecentFallbackTime) ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -10031,16 +10074,16 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var internals$jscomp$inline_1139 = { +var internals$jscomp$inline_1141 = { bundleType: 0, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function (mockNode) { mockNode = nodeToInstanceMap.get(mockNode); return void 0 !== mockNode ? mockNode.internalInstanceHandle : null; }, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910", + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$138 = 0; @@ -10058,16 +10101,16 @@ var internals$jscomp$inline_1139 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1341 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1343 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1341.isDisabled && - hook$jscomp$inline_1341.supportsFiber + !hook$jscomp$inline_1343.isDisabled && + hook$jscomp$inline_1343.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1341.inject( - internals$jscomp$inline_1139 + (rendererID = hook$jscomp$inline_1343.inject( + internals$jscomp$inline_1141 )), - (injectedHook = hook$jscomp$inline_1341); + (injectedHook = hook$jscomp$inline_1343); } catch (err) {} } exports._Scheduler = Scheduler; @@ -10191,4 +10234,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.0.0-native-fb-a5a7f106-20240910"; +exports.version = "19.0.0-native-fb-d6cb4e77-20240911"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index 4dcaf908d9456..1e2590266c58a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<395e6191abddaefed047ed772df65f1b>> + * @generated SignedSource<<3572332ee88914125f03e6a38c654311>> */ "use strict"; @@ -1705,7 +1705,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-native-fb-a5a7f106-20240910"; + exports.version = "19.0.0-native-fb-d6cb4e77-20240911"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index e0d5a020d1e6e..fdb31de4153e5 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<63fc6c060e52371c9110bd053c67cfc7>> */ "use strict"; @@ -580,4 +580,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-a5a7f106-20240910"; +exports.version = "19.0.0-native-fb-d6cb4e77-20240911"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index b058eb65053b3..0f71d321967f8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -584,7 +584,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-a5a7f106-20240910"; +exports.version = "19.0.0-native-fb-d6cb4e77-20240911"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index a14abc7012d0f..3bfa44f048c6c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -a5a7f1063e6f190c64c779b2aa54d28fb7b92cfb +d6cb4e771341ff82489c00f4907990cb8a75696b diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 802eac80c3c72..c93fc43a608c2 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<896bf8b1f76305c76285784dae9ebb6d>> + * @generated SignedSource<> */ "use strict"; @@ -1607,8 +1607,9 @@ __DEV__ && if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1617,26 +1618,28 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1710,8 +1713,15 @@ __DEV__ && for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } - function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -1720,16 +1730,17 @@ __DEV__ && root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index = 31 - clz32(noLongerPendingLanes), + var index = 31 - clz32(remainingLanes), lane = 1 << index; - remainingLanes[index] = 0; + entanglements[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -1741,9 +1752,13 @@ __DEV__ && var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -9162,12 +9177,12 @@ __DEV__ && } } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -11840,8 +11855,6 @@ __DEV__ && ); break; } - root.finishedWork = shouldTimeSlice; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (didTimeout) { @@ -11868,13 +11881,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = shouldTimeSlice; + renderWasConcurrent.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( renderWasConcurrent, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); else { if ( @@ -11903,6 +11920,8 @@ __DEV__ && workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), didTimeout @@ -11917,6 +11936,8 @@ __DEV__ && workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ); } @@ -11970,7 +11991,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -11980,31 +12003,33 @@ __DEV__ && recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$28) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error$28) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -12096,7 +12121,9 @@ __DEV__ && workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -12146,7 +12173,8 @@ __DEV__ && lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -12318,9 +12346,15 @@ __DEV__ && null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = NotSuspended), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = NotSuspended; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop( + root, + memoizedUpdaters, + thrownValue, + reason + ); } } workLoopSync(); @@ -12366,7 +12400,13 @@ __DEV__ && workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); - } + } else + workInProgressRootIsPrerendering && + (workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes)); markRenderStarted(lanes); a: do try { @@ -12382,7 +12422,12 @@ __DEV__ && case SuspendedOnError: workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop( + root, + lanes, + memoizedUpdaters, + SuspendedOnError + ); break; case SuspendedOnData: if (isThenableResolved(memoizedUpdaters)) { @@ -12414,7 +12459,12 @@ __DEV__ && replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = NotSuspended), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters)); + throwAndUnwindWorkLoop( + root, + lanes, + memoizedUpdaters, + SuspendedAndReadyToContinue + )); break; case SuspendedOnInstanceAndReadyToContinue: var resource = null; @@ -12446,12 +12496,22 @@ __DEV__ && } workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop( + root, + lanes, + memoizedUpdaters, + SuspendedOnInstanceAndReadyToContinue + ); break; case SuspendedOnDeprecatedThrowPromise: workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop( + root, + lanes, + memoizedUpdaters, + SuspendedOnDeprecatedThrowPromise + ); break; case SuspendedOnHydration: resetWorkInProgressStack(); @@ -12564,7 +12624,12 @@ __DEV__ && stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0); return current; } - function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { + function throwAndUnwindWorkLoop( + root, + unitOfWork, + thrownValue, + suspendedReason + ) { resetContextDependencies(); resetHooksOnUnwind(unitOfWork); thenableState$1 = null; @@ -12599,16 +12664,29 @@ __DEV__ && workInProgress = null; return; } - unitOfWork.flags & 32768 - ? (enableSiblingPrerendering - ? workInProgressSuspendedReason === SuspendedOnError - ? (root = !0) - : workInProgressRootIsPrerendering - ? (root = !1) - : (workInProgressRootDidSkipSuspendedSiblings = root = !0) - : (root = !0), - unwindUnitOfWork(unitOfWork, root)) - : completeUnitOfWork(unitOfWork); + if (unitOfWork.flags & 32768) { + if (enableSiblingPrerendering) + if (suspendedReason === SuspendedOnError) root = !0; + else if ( + workInProgressRootIsPrerendering || + 0 !== (workInProgressRootRenderLanes & 536870912) + ) + root = !1; + else { + if ( + ((workInProgressRootDidSkipSuspendedSiblings = root = !0), + suspendedReason === SuspendedOnData || + suspendedReason === SuspendedOnImmediate || + suspendedReason === SuspendedOnDeprecatedThrowPromise) + ) + (suspendedReason = suspenseHandlerStackCursor.current), + null !== suspendedReason && + 13 === suspendedReason.tag && + (suspendedReason.flags |= 16384); + } + else root = !0; + unwindUnitOfWork(unitOfWork, root); + } else completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; @@ -12690,7 +12768,9 @@ __DEV__ && recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -12703,7 +12783,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -12717,7 +12799,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -12746,7 +12830,14 @@ __DEV__ && root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -12762,31 +12853,31 @@ __DEV__ && return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = DiscreteEventPriority; - var prevExecutionContext = executionContext; - executionContext |= CommitContext; - commitBeforeMutationEffects(root, finishedWork); - commitTime = now(); - commitMutationEffects(root, finishedWork, lanes); - root.current = finishedWork; - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes); - commitLayoutEffects(finishedWork, root, lanes); - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else (root.current = finishedWork), (commitTime = now()); + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = DiscreteEventPriority), + (updatedLanes = executionContext), + (executionContext |= CommitContext), + commitBeforeMutationEffects(root, finishedWork), + (commitTime = now()), + commitMutationEffects(root, finishedWork, lanes), + (root.current = finishedWork), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes), + commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : ((root.current = finishedWork), (commitTime = now())); (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -13086,7 +13177,9 @@ __DEV__ && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) ? (executionContext & RenderContext) === NoContext && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -16712,6 +16805,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -17033,11 +17127,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910" + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 7417dc53ae382..7ae659f0162ac 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<6bf9a920b8e728a4425f244949788e0c>> + * @generated SignedSource<> */ "use strict"; @@ -1735,8 +1735,9 @@ function getNextLanes(root, wipLanes) { if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1745,26 +1746,28 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1830,8 +1833,15 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; +function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes +) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -1840,16 +1850,17 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index$10 = 31 - clz32(noLongerPendingLanes), + var index$10 = 31 - clz32(remainingLanes), lane = 1 << index$10; - remainingLanes[index$10] = 0; + entanglements[index$10] = 0; expirationTimes[index$10] = -1; var hiddenUpdatesForLane = hiddenUpdates[index$10]; if (null !== hiddenUpdatesForLane) @@ -1861,9 +1872,13 @@ function markRootFinished(root, remainingLanes, spawnedLane) { var update = hiddenUpdatesForLane[index$10]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -7261,12 +7276,12 @@ function updateHostContainer(current, workInProgress) { } } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -9149,6 +9164,7 @@ var DefaultAsyncDispatcher = { workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -9279,8 +9295,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { ); break; } - root.finishedWork = didTimeout; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (exitStatus) { @@ -9307,6 +9321,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = didTimeout; + renderWasConcurrent.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === exitStatus) && @@ -9330,6 +9346,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), exitStatus @@ -9343,7 +9361,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); } } @@ -9393,7 +9413,9 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -9403,31 +9425,33 @@ function commitRootWhenReady( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -9514,7 +9538,9 @@ function performSyncWorkOnRoot(root, lanes) { workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -9556,7 +9582,8 @@ function prepareFreshStack(root, lanes) { 0 === (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); workInProgressRootDidAttachPingListener = !1; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -9678,9 +9705,10 @@ function renderRootSync(root, lanes) { null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = 0), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, unitOfWork, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); @@ -9711,10 +9739,16 @@ function renderRootConcurrent(root, lanes) { executionContext |= 2; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : workInProgressRootIsPrerendering && + (workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes)); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9724,7 +9758,7 @@ function renderRootConcurrent(root, lanes) { case 1: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 1); break; case 2: if (isThenableResolved(thrownValue)) { @@ -9754,7 +9788,7 @@ function renderRootConcurrent(root, lanes) { replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = 0), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, thrownValue)); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 7)); break; case 5: var resource = null; @@ -9781,12 +9815,12 @@ function renderRootConcurrent(root, lanes) { } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 5); break; case 6: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 6); break; case 8: resetWorkInProgressStack(); @@ -9863,7 +9897,12 @@ function replaySuspendedUnitOfWork(unitOfWork) { unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); } -function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { +function throwAndUnwindWorkLoop( + root, + unitOfWork, + thrownValue, + suspendedReason +) { resetContextDependencies(); resetHooksOnUnwind(unitOfWork); thenableState$1 = null; @@ -9897,16 +9936,29 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - unitOfWork.flags & 32768 - ? (enableSiblingPrerendering - ? 1 === workInProgressSuspendedReason - ? (root = !0) - : workInProgressRootIsPrerendering - ? (root = !1) - : (workInProgressRootDidSkipSuspendedSiblings = root = !0) - : (root = !0), - unwindUnitOfWork(unitOfWork, root)) - : completeUnitOfWork(unitOfWork); + if (unitOfWork.flags & 32768) { + if (enableSiblingPrerendering) + if (1 === suspendedReason) root = !0; + else if ( + workInProgressRootIsPrerendering || + 0 !== (workInProgressRootRenderLanes & 536870912) + ) + root = !1; + else { + if ( + ((workInProgressRootDidSkipSuspendedSiblings = root = !0), + 2 === suspendedReason || + 3 === suspendedReason || + 6 === suspendedReason) + ) + (suspendedReason = suspenseHandlerStackCursor.current), + null !== suspendedReason && + 13 === suspendedReason.tag && + (suspendedReason.flags |= 16384); + } + else root = !0; + unwindUnitOfWork(unitOfWork, root); + } else completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; @@ -9965,7 +10017,9 @@ function commitRoot( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -9978,7 +10032,9 @@ function commitRoot( transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -9992,7 +10048,9 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -10012,7 +10070,14 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -10028,22 +10093,22 @@ function commitRootImpl( return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = 2; - var prevExecutionContext = executionContext; - executionContext |= 4; - commitBeforeMutationEffects(root, finishedWork); - commitMutationEffectsOnFiber(finishedWork, root); - root.current = finishedWork; - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else root.current = finishedWork; + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = 2), + (updatedLanes = executionContext), + (executionContext |= 4), + commitBeforeMutationEffects(root, finishedWork), + commitMutationEffectsOnFiber(finishedWork, root), + (root.current = finishedWork), + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : (root.current = finishedWork); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -10213,7 +10278,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { workInProgressRootRenderLanes && 300 > now() - globalMostRecentFallbackTime) ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -10976,27 +11043,27 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1162 = { + internals$jscomp$inline_1157 = { bundleType: 0, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910" + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1162.rendererConfig = extraDevToolsConfig); + (internals$jscomp$inline_1157.rendererConfig = extraDevToolsConfig); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1429 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1424 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1429.isDisabled && - hook$jscomp$inline_1429.supportsFiber + !hook$jscomp$inline_1424.isDisabled && + hook$jscomp$inline_1424.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1429.inject( - internals$jscomp$inline_1162 + (rendererID = hook$jscomp$inline_1424.inject( + internals$jscomp$inline_1157 )), - (injectedHook = hook$jscomp$inline_1429); + (injectedHook = hook$jscomp$inline_1424); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 38e275197261c..212722e17cf30 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8ad56df9c7b93b1db67af3c5c2b936cd>> + * @generated SignedSource<<752342ba1e4a42fdfe4a2a763bab5db2>> */ "use strict"; @@ -1816,8 +1816,9 @@ function getNextLanes(root, wipLanes) { if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1826,26 +1827,28 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1911,8 +1914,15 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; +function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes +) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -1921,16 +1931,17 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index$10 = 31 - clz32(noLongerPendingLanes), + var index$10 = 31 - clz32(remainingLanes), lane = 1 << index$10; - remainingLanes[index$10] = 0; + entanglements[index$10] = 0; expirationTimes[index$10] = -1; var hiddenUpdatesForLane = hiddenUpdates[index$10]; if (null !== hiddenUpdatesForLane) @@ -1942,9 +1953,13 @@ function markRootFinished(root, remainingLanes, spawnedLane) { var update = hiddenUpdatesForLane[index$10]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -7480,12 +7495,12 @@ function updateHostContainer(current, workInProgress) { } } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -9645,6 +9660,7 @@ var DefaultAsyncDispatcher = { workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -9778,8 +9794,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { ); break; } - root.finishedWork = didTimeout; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (exitStatus) { @@ -9806,6 +9820,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = didTimeout; + renderWasConcurrent.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === exitStatus) && @@ -9829,6 +9845,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), exitStatus @@ -9842,7 +9860,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); } } @@ -9892,7 +9912,9 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -9902,31 +9924,33 @@ function commitRootWhenReady( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -10015,7 +10039,9 @@ function performSyncWorkOnRoot(root, lanes) { workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -10057,7 +10083,8 @@ function prepareFreshStack(root, lanes) { 0 === (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); workInProgressRootDidAttachPingListener = !1; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -10218,9 +10245,10 @@ function renderRootSync(root, lanes) { null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = 0), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); } } workLoopSync(); @@ -10263,7 +10291,13 @@ function renderRootConcurrent(root, lanes) { workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); - } + } else + workInProgressRootIsPrerendering && + (workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes)); markRenderStarted(lanes); a: do try { @@ -10276,7 +10310,7 @@ function renderRootConcurrent(root, lanes) { case 1: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 1); break; case 2: if (isThenableResolved(memoizedUpdaters)) { @@ -10306,7 +10340,7 @@ function renderRootConcurrent(root, lanes) { replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = 0), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters)); + throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 7)); break; case 5: var resource = null; @@ -10333,12 +10367,12 @@ function renderRootConcurrent(root, lanes) { } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 5); break; case 6: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 6); break; case 8: resetWorkInProgressStack(); @@ -10432,7 +10466,12 @@ function replaySuspendedUnitOfWork(unitOfWork) { unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); } -function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { +function throwAndUnwindWorkLoop( + root, + unitOfWork, + thrownValue, + suspendedReason +) { resetContextDependencies(); resetHooksOnUnwind(unitOfWork); thenableState$1 = null; @@ -10466,16 +10505,29 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - unitOfWork.flags & 32768 - ? (enableSiblingPrerendering - ? 1 === workInProgressSuspendedReason - ? (root = !0) - : workInProgressRootIsPrerendering - ? (root = !1) - : (workInProgressRootDidSkipSuspendedSiblings = root = !0) - : (root = !0), - unwindUnitOfWork(unitOfWork, root)) - : completeUnitOfWork(unitOfWork); + if (unitOfWork.flags & 32768) { + if (enableSiblingPrerendering) + if (1 === suspendedReason) root = !0; + else if ( + workInProgressRootIsPrerendering || + 0 !== (workInProgressRootRenderLanes & 536870912) + ) + root = !1; + else { + if ( + ((workInProgressRootDidSkipSuspendedSiblings = root = !0), + 2 === suspendedReason || + 3 === suspendedReason || + 6 === suspendedReason) + ) + (suspendedReason = suspenseHandlerStackCursor.current), + null !== suspendedReason && + 13 === suspendedReason.tag && + (suspendedReason.flags |= 16384); + } + else root = !0; + unwindUnitOfWork(unitOfWork, root); + } else completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; @@ -10542,7 +10594,9 @@ function commitRoot( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -10555,7 +10609,9 @@ function commitRoot( transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -10569,7 +10625,9 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -10592,7 +10650,14 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -10608,29 +10673,29 @@ function commitRootImpl( return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = 2; - var prevExecutionContext = executionContext; - executionContext |= 4; - commitBeforeMutationEffects(root, finishedWork); - commitTime = now(); - commitMutationEffects(root, finishedWork, lanes); - root.current = finishedWork; - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes); - commitLayoutEffects(finishedWork, root, lanes); - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else (root.current = finishedWork), (commitTime = now()); + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = 2), + (updatedLanes = executionContext), + (executionContext |= 4), + commitBeforeMutationEffects(root, finishedWork), + (commitTime = now()), + commitMutationEffects(root, finishedWork, lanes), + (root.current = finishedWork), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes), + commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : ((root.current = finishedWork), (commitTime = now())); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -10862,7 +10927,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { workInProgressRootRenderLanes && 300 > now$1() - globalMostRecentFallbackTime) ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -11654,17 +11721,17 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1247 = { + internals$jscomp$inline_1242 = { bundleType: 0, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910" + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1247.rendererConfig = extraDevToolsConfig); -internals$jscomp$inline_1247.getLaneLabelMap = function () { + (internals$jscomp$inline_1242.rendererConfig = extraDevToolsConfig); +internals$jscomp$inline_1242.getLaneLabelMap = function () { for ( var map = new Map(), lane = 1, index$146 = 0; 31 > index$146; @@ -11676,20 +11743,20 @@ internals$jscomp$inline_1247.getLaneLabelMap = function () { } return map; }; -internals$jscomp$inline_1247.injectProfilingHooks = function (profilingHooks) { +internals$jscomp$inline_1242.injectProfilingHooks = function (profilingHooks) { injectedProfilingHooks = profilingHooks; }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1500 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1495 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1500.isDisabled && - hook$jscomp$inline_1500.supportsFiber + !hook$jscomp$inline_1495.isDisabled && + hook$jscomp$inline_1495.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1500.inject( - internals$jscomp$inline_1247 + (rendererID = hook$jscomp$inline_1495.inject( + internals$jscomp$inline_1242 )), - (injectedHook = hook$jscomp$inline_1500); + (injectedHook = hook$jscomp$inline_1495); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 3f6077025c8f1..72d0f4849e32d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<38906953b5d5c7b5c1b15f5d4e7aae29>> + * @generated SignedSource<> */ "use strict"; @@ -1698,8 +1698,9 @@ __DEV__ && if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1708,26 +1709,28 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1801,8 +1804,15 @@ __DEV__ && for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } - function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -1811,16 +1821,17 @@ __DEV__ && root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index = 31 - clz32(noLongerPendingLanes), + var index = 31 - clz32(remainingLanes), lane = 1 << index; - remainingLanes[index] = 0; + entanglements[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -1832,9 +1843,13 @@ __DEV__ && var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -9267,12 +9282,12 @@ __DEV__ && : { parent: CacheContext._currentValue, pool: cacheFromPool }; } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -12207,8 +12222,6 @@ __DEV__ && ); break; } - root.finishedWork = shouldTimeSlice; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (didTimeout) { @@ -12235,13 +12248,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = shouldTimeSlice; + renderWasConcurrent.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( renderWasConcurrent, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); else { if ( @@ -12270,6 +12287,8 @@ __DEV__ && workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), didTimeout @@ -12284,6 +12303,8 @@ __DEV__ && workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ); } @@ -12336,7 +12357,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -12346,31 +12369,33 @@ __DEV__ && recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$33) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error$33) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -12462,7 +12487,9 @@ __DEV__ && workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -12512,7 +12539,8 @@ __DEV__ && lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -12684,9 +12712,15 @@ __DEV__ && null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = NotSuspended), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = NotSuspended; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop( + root, + memoizedUpdaters, + thrownValue, + reason + ); } } workLoopSync(); @@ -12732,7 +12766,13 @@ __DEV__ && workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); - } + } else + workInProgressRootIsPrerendering && + (workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes)); markRenderStarted(lanes); a: do try { @@ -12748,7 +12788,12 @@ __DEV__ && case SuspendedOnError: workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop( + root, + lanes, + memoizedUpdaters, + SuspendedOnError + ); break; case SuspendedOnData: if (isThenableResolved(memoizedUpdaters)) { @@ -12780,7 +12825,12 @@ __DEV__ && replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = NotSuspended), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters)); + throwAndUnwindWorkLoop( + root, + lanes, + memoizedUpdaters, + SuspendedAndReadyToContinue + )); break; case SuspendedOnInstanceAndReadyToContinue: var resource = null; @@ -12812,12 +12862,22 @@ __DEV__ && } workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop( + root, + lanes, + memoizedUpdaters, + SuspendedOnInstanceAndReadyToContinue + ); break; case SuspendedOnDeprecatedThrowPromise: workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop( + root, + lanes, + memoizedUpdaters, + SuspendedOnDeprecatedThrowPromise + ); break; case SuspendedOnHydration: resetWorkInProgressStack(); @@ -12930,7 +12990,12 @@ __DEV__ && stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0); return current; } - function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { + function throwAndUnwindWorkLoop( + root, + unitOfWork, + thrownValue, + suspendedReason + ) { resetContextDependencies(); resetHooksOnUnwind(unitOfWork); thenableState$1 = null; @@ -12965,16 +13030,29 @@ __DEV__ && workInProgress = null; return; } - unitOfWork.flags & 32768 - ? (enableSiblingPrerendering - ? workInProgressSuspendedReason === SuspendedOnError - ? (root = !0) - : workInProgressRootIsPrerendering - ? (root = !1) - : (workInProgressRootDidSkipSuspendedSiblings = root = !0) - : (root = !0), - unwindUnitOfWork(unitOfWork, root)) - : completeUnitOfWork(unitOfWork); + if (unitOfWork.flags & 32768) { + if (enableSiblingPrerendering) + if (suspendedReason === SuspendedOnError) root = !0; + else if ( + workInProgressRootIsPrerendering || + 0 !== (workInProgressRootRenderLanes & 536870912) + ) + root = !1; + else { + if ( + ((workInProgressRootDidSkipSuspendedSiblings = root = !0), + suspendedReason === SuspendedOnData || + suspendedReason === SuspendedOnImmediate || + suspendedReason === SuspendedOnDeprecatedThrowPromise) + ) + (suspendedReason = suspenseHandlerStackCursor.current), + null !== suspendedReason && + 13 === suspendedReason.tag && + (suspendedReason.flags |= 16384); + } + else root = !0; + unwindUnitOfWork(unitOfWork, root); + } else completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; @@ -13056,7 +13134,9 @@ __DEV__ && recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -13069,7 +13149,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -13083,7 +13165,9 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -13112,7 +13196,14 @@ __DEV__ && root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -13128,31 +13219,31 @@ __DEV__ && return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = DiscreteEventPriority; - var prevExecutionContext = executionContext; - executionContext |= CommitContext; - commitBeforeMutationEffects(root, finishedWork); - commitTime = now(); - commitMutationEffects(root, finishedWork, lanes); - root.current = finishedWork; - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes); - commitLayoutEffects(finishedWork, root, lanes); - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else (root.current = finishedWork), (commitTime = now()); + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = DiscreteEventPriority), + (updatedLanes = executionContext), + (executionContext |= CommitContext), + commitBeforeMutationEffects(root, finishedWork), + (commitTime = now()), + commitMutationEffects(root, finishedWork, lanes), + (root.current = finishedWork), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes), + commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : ((root.current = finishedWork), (commitTime = now())); (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -13452,7 +13543,9 @@ __DEV__ && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) ? (executionContext & RenderContext) === NoContext && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -17141,6 +17234,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -17257,11 +17351,11 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-a5a7f106-20240910" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-d6cb4e77-20240911" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-a5a7f106-20240910\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-d6cb4e77-20240911\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -17287,11 +17381,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910" + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index bf392b97727c5..677ee46bf889a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<09826de6b2f549defa34bff5f481a2a5>> + * @generated SignedSource<<946cfa184171d80b603594d276caa836>> */ "use strict"; @@ -1936,8 +1936,9 @@ function getNextLanes(root, wipLanes) { if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1946,26 +1947,28 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -2031,8 +2034,15 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; +function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes +) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -2041,16 +2051,17 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index$12 = 31 - clz32(noLongerPendingLanes), + var index$12 = 31 - clz32(remainingLanes), lane = 1 << index$12; - remainingLanes[index$12] = 0; + entanglements[index$12] = 0; expirationTimes[index$12] = -1; var hiddenUpdatesForLane = hiddenUpdates[index$12]; if (null !== hiddenUpdatesForLane) @@ -2062,9 +2073,13 @@ function markRootFinished(root, remainingLanes, spawnedLane) { var update = hiddenUpdatesForLane[index$12]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -7431,12 +7446,12 @@ function getSuspendedCache() { : { parent: CacheContext._currentValue, pool: cacheFromPool }; } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -9578,6 +9593,7 @@ var DefaultAsyncDispatcher = { workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -9710,8 +9726,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { ); break; } - root.finishedWork = didTimeout; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (exitStatus) { @@ -9738,6 +9752,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = didTimeout; + renderWasConcurrent.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === exitStatus) && @@ -9761,6 +9777,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), exitStatus @@ -9774,7 +9792,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); } } @@ -9824,7 +9844,9 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -9834,31 +9856,33 @@ function commitRootWhenReady( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -9945,7 +9969,9 @@ function performSyncWorkOnRoot(root, lanes) { workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -9987,7 +10013,8 @@ function prepareFreshStack(root, lanes) { 0 === (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); workInProgressRootDidAttachPingListener = !1; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -10109,9 +10136,10 @@ function renderRootSync(root, lanes) { null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = 0), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, unitOfWork, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); @@ -10142,10 +10170,16 @@ function renderRootConcurrent(root, lanes) { executionContext |= 2; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : workInProgressRootIsPrerendering && + (workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes)); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10155,7 +10189,7 @@ function renderRootConcurrent(root, lanes) { case 1: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 1); break; case 2: if (isThenableResolved(thrownValue)) { @@ -10185,7 +10219,7 @@ function renderRootConcurrent(root, lanes) { replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = 0), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, thrownValue)); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 7)); break; case 5: var resource = null; @@ -10212,12 +10246,12 @@ function renderRootConcurrent(root, lanes) { } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 5); break; case 6: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, thrownValue); + throwAndUnwindWorkLoop(root, lanes, thrownValue, 6); break; case 8: resetWorkInProgressStack(); @@ -10294,7 +10328,12 @@ function replaySuspendedUnitOfWork(unitOfWork) { unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); } -function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { +function throwAndUnwindWorkLoop( + root, + unitOfWork, + thrownValue, + suspendedReason +) { resetContextDependencies(); resetHooksOnUnwind(unitOfWork); thenableState$1 = null; @@ -10328,16 +10367,29 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - unitOfWork.flags & 32768 - ? (enableSiblingPrerendering - ? 1 === workInProgressSuspendedReason - ? (root = !0) - : workInProgressRootIsPrerendering - ? (root = !1) - : (workInProgressRootDidSkipSuspendedSiblings = root = !0) - : (root = !0), - unwindUnitOfWork(unitOfWork, root)) - : completeUnitOfWork(unitOfWork); + if (unitOfWork.flags & 32768) { + if (enableSiblingPrerendering) + if (1 === suspendedReason) root = !0; + else if ( + workInProgressRootIsPrerendering || + 0 !== (workInProgressRootRenderLanes & 536870912) + ) + root = !1; + else { + if ( + ((workInProgressRootDidSkipSuspendedSiblings = root = !0), + 2 === suspendedReason || + 3 === suspendedReason || + 6 === suspendedReason) + ) + (suspendedReason = suspenseHandlerStackCursor.current), + null !== suspendedReason && + 13 === suspendedReason.tag && + (suspendedReason.flags |= 16384); + } + else root = !0; + unwindUnitOfWork(unitOfWork, root); + } else completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; @@ -10396,7 +10448,9 @@ function commitRoot( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -10409,7 +10463,9 @@ function commitRoot( transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -10423,7 +10479,9 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -10443,7 +10501,14 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -10459,22 +10524,22 @@ function commitRootImpl( return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = 2; - var prevExecutionContext = executionContext; - executionContext |= 4; - commitBeforeMutationEffects(root, finishedWork); - commitMutationEffectsOnFiber(finishedWork, root); - root.current = finishedWork; - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else root.current = finishedWork; + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = 2), + (updatedLanes = executionContext), + (executionContext |= 4), + commitBeforeMutationEffects(root, finishedWork), + commitMutationEffectsOnFiber(finishedWork, root), + (root.current = finishedWork), + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : (root.current = finishedWork); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -10644,7 +10709,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { workInProgressRootRenderLanes && 300 > now() - globalMostRecentFallbackTime) ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -11107,11 +11174,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-native-fb-a5a7f106-20240910" !== isomorphicReactPackageVersion) +if ("19.0.0-native-fb-d6cb4e77-20240911" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-a5a7f106-20240910\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-d6cb4e77-20240911\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11158,27 +11225,27 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1228 = { + internals$jscomp$inline_1223 = { bundleType: 0, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910" + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1228.rendererConfig = extraDevToolsConfig); + (internals$jscomp$inline_1223.rendererConfig = extraDevToolsConfig); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1520 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1515 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1520.isDisabled && - hook$jscomp$inline_1520.supportsFiber + !hook$jscomp$inline_1515.isDisabled && + hook$jscomp$inline_1515.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1520.inject( - internals$jscomp$inline_1228 + (rendererID = hook$jscomp$inline_1515.inject( + internals$jscomp$inline_1223 )), - (injectedHook = hook$jscomp$inline_1520); + (injectedHook = hook$jscomp$inline_1515); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 71a879ac24602..fecb0ff5c7acc 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -2017,8 +2017,9 @@ function getNextLanes(root, wipLanes) { if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; + pingedLanes = root.pingedLanes, + warmLanes = root.warmLanes; + root = 0 !== root.finishedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -2027,26 +2028,28 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = nonIdlePendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : root || + ((warmLanes = nonIdlePendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : ((pingedLanes = pendingLanes & ~root), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))); + : root || + ((warmLanes = pendingLanes & ~warmLanes), + 0 !== warmLanes && + (nextLanes = getHighestPriorityLanes(warmLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (pingedLanes = wipLanes & -wipLanes), - suspendedLanes >= pingedLanes || - (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) + (warmLanes = wipLanes & -wipLanes), + suspendedLanes >= warmLanes || + (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) ? wipLanes : nextLanes; } @@ -2112,8 +2115,15 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished(root, remainingLanes, spawnedLane) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; +function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes +) { + var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; @@ -2122,16 +2132,17 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - remainingLanes = root.entanglements; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; for ( - var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - 0 < noLongerPendingLanes; + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; ) { - var index$12 = 31 - clz32(noLongerPendingLanes), + var index$12 = 31 - clz32(remainingLanes), lane = 1 << index$12; - remainingLanes[index$12] = 0; + entanglements[index$12] = 0; expirationTimes[index$12] = -1; var hiddenUpdatesForLane = hiddenUpdates[index$12]; if (null !== hiddenUpdatesForLane) @@ -2143,9 +2154,13 @@ function markRootFinished(root, remainingLanes, spawnedLane) { var update = hiddenUpdatesForLane[index$12]; null !== update && (update.lane &= -536870913); } - noLongerPendingLanes &= ~lane; + remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -7650,12 +7665,12 @@ function getSuspendedCache() { : { parent: CacheContext._currentValue, pool: cacheFromPool }; } function scheduleRetryEffect(workInProgress, retryQueue) { - null !== retryQueue - ? (workInProgress.flags |= 4) - : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue)); + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -10075,6 +10090,7 @@ var DefaultAsyncDispatcher = { workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, + workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, @@ -10210,8 +10226,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { ); break; } - root.finishedWork = didTimeout; - root.finishedLanes = lanes; a: { renderWasConcurrent = root; switch (exitStatus) { @@ -10238,6 +10252,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { default: throw Error("Unknown root exit status."); } + renderWasConcurrent.finishedWork = didTimeout; + renderWasConcurrent.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === exitStatus) && @@ -10261,6 +10277,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings ), exitStatus @@ -10274,7 +10292,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); } } @@ -10324,7 +10344,9 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && @@ -10334,31 +10356,33 @@ function commitRootWhenReady( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { - if (node.flags & 16384) { - var updateQueue = node.updateQueue; - if ( - null !== updateQueue && - ((updateQueue = updateQueue.stores), null !== updateQueue) - ) - for (var i = 0; i < updateQueue.length; i++) { - var check = updateQueue[i], - getSnapshot = check.getSnapshot; - check = check.value; - try { - if (!objectIs(getSnapshot(), check)) return !1; - } catch (error) { - return !1; - } + var tag = node.tag; + if ( + (0 === tag || 11 === tag || 15 === tag) && + node.flags & 16384 && + ((tag = node.updateQueue), + null !== tag && ((tag = tag.stores), null !== tag)) + ) + for (var i = 0; i < tag.length; i++) { + var check = tag[i], + getSnapshot = check.getSnapshot; + check = check.value; + try { + if (!objectIs(getSnapshot(), check)) return !1; + } catch (error) { + return !1; } - } - updateQueue = node.child; - if (node.subtreeFlags & 16384 && null !== updateQueue) - (updateQueue.return = node), (node = updateQueue); + } + tag = node.child; + if (node.subtreeFlags & 16384 && null !== tag) + (tag.return = node), (node = tag); else { if (node === finishedWork) break; for (; null === node.sibling; ) { @@ -10447,7 +10471,9 @@ function performSyncWorkOnRoot(root, lanes) { workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes ); ensureRootIsScheduled(root); return null; @@ -10489,7 +10515,8 @@ function prepareFreshStack(root, lanes) { 0 === (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); workInProgressRootDidAttachPingListener = !1; - workInProgressDeferredLane = + workInProgressSuspendedRetryLanes = + workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = @@ -10650,9 +10677,10 @@ function renderRootSync(root, lanes) { null !== suspenseHandlerStackCursor.current || (lanes = !0); default: - (workInProgressSuspendedReason = 0), - (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue); + var reason = workInProgressSuspendedReason; + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); } } workLoopSync(); @@ -10695,7 +10723,13 @@ function renderRootConcurrent(root, lanes) { workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); - } + } else + workInProgressRootIsPrerendering && + (workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes)); markRenderStarted(lanes); a: do try { @@ -10708,7 +10742,7 @@ function renderRootConcurrent(root, lanes) { case 1: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 1); break; case 2: if (isThenableResolved(memoizedUpdaters)) { @@ -10738,7 +10772,7 @@ function renderRootConcurrent(root, lanes) { replaySuspendedUnitOfWork(lanes)) : ((workInProgressSuspendedReason = 0), (workInProgressThrownValue = null), - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters)); + throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 7)); break; case 5: var resource = null; @@ -10765,12 +10799,12 @@ function renderRootConcurrent(root, lanes) { } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 5); break; case 6: workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters); + throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 6); break; case 8: resetWorkInProgressStack(); @@ -10864,7 +10898,12 @@ function replaySuspendedUnitOfWork(unitOfWork) { unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); } -function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { +function throwAndUnwindWorkLoop( + root, + unitOfWork, + thrownValue, + suspendedReason +) { resetContextDependencies(); resetHooksOnUnwind(unitOfWork); thenableState$1 = null; @@ -10898,16 +10937,29 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - unitOfWork.flags & 32768 - ? (enableSiblingPrerendering - ? 1 === workInProgressSuspendedReason - ? (root = !0) - : workInProgressRootIsPrerendering - ? (root = !1) - : (workInProgressRootDidSkipSuspendedSiblings = root = !0) - : (root = !0), - unwindUnitOfWork(unitOfWork, root)) - : completeUnitOfWork(unitOfWork); + if (unitOfWork.flags & 32768) { + if (enableSiblingPrerendering) + if (1 === suspendedReason) root = !0; + else if ( + workInProgressRootIsPrerendering || + 0 !== (workInProgressRootRenderLanes & 536870912) + ) + root = !1; + else { + if ( + ((workInProgressRootDidSkipSuspendedSiblings = root = !0), + 2 === suspendedReason || + 3 === suspendedReason || + 6 === suspendedReason) + ) + (suspendedReason = suspenseHandlerStackCursor.current), + null !== suspendedReason && + 13 === suspendedReason.tag && + (suspendedReason.flags |= 16384); + } + else root = !0; + unwindUnitOfWork(unitOfWork, root); + } else completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; @@ -10974,7 +11026,9 @@ function commitRoot( recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; @@ -10987,7 +11041,9 @@ function commitRoot( transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ); } finally { (ReactSharedInternals.T = prevTransition), @@ -11001,7 +11057,9 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane + spawnedLane, + updatedLanes, + suspendedRetryLanes ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11024,7 +11082,14 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished(root, remainingLanes, spawnedLane); + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11040,29 +11105,29 @@ function commitRootImpl( return null; })); transitions = 0 !== (finishedWork.flags & 15990); - if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactSharedInternals.T; - ReactSharedInternals.T = null; - spawnedLane = currentUpdatePriority; - currentUpdatePriority = 2; - var prevExecutionContext = executionContext; - executionContext |= 4; - commitBeforeMutationEffects(root, finishedWork); - commitTime = now(); - commitMutationEffects(root, finishedWork, lanes); - root.current = finishedWork; - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes); - commitLayoutEffects(finishedWork, root, lanes); - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(); - requestPaint(); - executionContext = prevExecutionContext; - currentUpdatePriority = spawnedLane; - ReactSharedInternals.T = transitions; - } else (root.current = finishedWork), (commitTime = now()); + 0 !== (finishedWork.subtreeFlags & 15990) || transitions + ? ((transitions = ReactSharedInternals.T), + (ReactSharedInternals.T = null), + (spawnedLane = currentUpdatePriority), + (currentUpdatePriority = 2), + (updatedLanes = executionContext), + (executionContext |= 4), + commitBeforeMutationEffects(root, finishedWork), + (commitTime = now()), + commitMutationEffects(root, finishedWork, lanes), + (root.current = finishedWork), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes), + commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(), + requestPaint(), + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions)) + : ((root.current = finishedWork), (commitTime = now())); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -11294,7 +11359,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { workInProgressRootRenderLanes && 300 > now$1() - globalMostRecentFallbackTime) ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) - : (workInProgressRootPingedLanes |= pingedLanes)); + : (workInProgressRootPingedLanes |= pingedLanes), + workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && + (workInProgressSuspendedRetryLanes = 0)); ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { @@ -11786,11 +11853,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-native-fb-a5a7f106-20240910" !== isomorphicReactPackageVersion) +if ("19.0.0-native-fb-d6cb4e77-20240911" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-a5a7f106-20240910\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-d6cb4e77-20240911\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11837,17 +11904,17 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1313 = { + internals$jscomp$inline_1308 = { bundleType: 0, - version: "19.0.0-native-fb-a5a7f106-20240910", + version: "19.0.0-native-fb-d6cb4e77-20240911", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910" + reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1313.rendererConfig = extraDevToolsConfig); -internals$jscomp$inline_1313.getLaneLabelMap = function () { + (internals$jscomp$inline_1308.rendererConfig = extraDevToolsConfig); +internals$jscomp$inline_1308.getLaneLabelMap = function () { for ( var map = new Map(), lane = 1, index$150 = 0; 31 > index$150; @@ -11859,20 +11926,20 @@ internals$jscomp$inline_1313.getLaneLabelMap = function () { } return map; }; -internals$jscomp$inline_1313.injectProfilingHooks = function (profilingHooks) { +internals$jscomp$inline_1308.injectProfilingHooks = function (profilingHooks) { injectedProfilingHooks = profilingHooks; }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1591 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1586 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1591.isDisabled && - hook$jscomp$inline_1591.supportsFiber + !hook$jscomp$inline_1586.isDisabled && + hook$jscomp$inline_1586.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1591.inject( - internals$jscomp$inline_1313 + (rendererID = hook$jscomp$inline_1586.inject( + internals$jscomp$inline_1308 )), - (injectedHook = hook$jscomp$inline_1591); + (injectedHook = hook$jscomp$inline_1586); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {