mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Bugfix: Fix crash when suspending in shell during useSES re-render (#27199)
This adds a regression test for a bug where, after a store mutation, the updated data causes the shell of the app to suspend. When re-rendering due to a concurrent store mutation, we must check for the RootDidNotComplete exit status again. As a follow-up, I'm going to look into to cleaning up the places where we check the exit status, so bugs like these are less likely. I think we might be able to combine most of it into a single switch statement. DiffTrain build for commit https://github.com/facebook/react/commit/201becd3d294b38824930a818e3412c6e04ba2eb.
This commit is contained in:
+48
-69
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<4a19698954f795c20e290576071bf6b0>>
|
||||
* @generated SignedSource<<230654f3b3965419686a3411beb73101>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -20310,92 +20310,71 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
: renderRootSync(root, lanes);
|
||||
|
||||
if (exitStatus !== RootInProgress) {
|
||||
if (exitStatus === RootErrored) {
|
||||
// If something threw an error, try rendering one more time. We'll
|
||||
// render synchronously to block concurrent data mutations, and we'll
|
||||
// includes all pending updates are included. If it still fails after
|
||||
// the second attempt, we'll give up and commit the resulting tree.
|
||||
var originallyAttemptedLanes = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
var renderWasConcurrent = shouldTimeSlice;
|
||||
|
||||
if (errorRetryLanes !== NoLanes) {
|
||||
lanes = errorRetryLanes;
|
||||
exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
);
|
||||
}
|
||||
}
|
||||
do {
|
||||
if (exitStatus === RootDidNotComplete) {
|
||||
// The render unwound without completing the tree. This happens in special
|
||||
// cases where need to exit the current render without producing a
|
||||
// consistent tree or committing.
|
||||
markRootSuspended(root, lanes);
|
||||
} else {
|
||||
// The render completed.
|
||||
// Check if this render may have yielded to a concurrent event, and if so,
|
||||
// confirm that any newly rendered stores are consistent.
|
||||
// TODO: It's possible that even a concurrent render may never have yielded
|
||||
// to the main thread, if it was fast enough, or if it expired. We could
|
||||
// skip the consistency check in that case, too.
|
||||
var finishedWork = root.current.alternate;
|
||||
|
||||
if (exitStatus === RootFatalErrored) {
|
||||
var fatalError = workInProgressRootFatalError;
|
||||
prepareFreshStack(root, NoLanes);
|
||||
markRootSuspended(root, lanes);
|
||||
ensureRootIsScheduled(root);
|
||||
throw fatalError;
|
||||
}
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(finishedWork)
|
||||
) {
|
||||
// A store was mutated in an interleaved event. Render again,
|
||||
// synchronously, to block further mutations.
|
||||
exitStatus = renderRootSync(root, lanes); // We assume the tree is now consistent because we didn't yield to any
|
||||
// concurrent events.
|
||||
|
||||
if (exitStatus === RootDidNotComplete) {
|
||||
// The render unwound without completing the tree. This happens in special
|
||||
// cases where need to exit the current render without producing a
|
||||
// consistent tree or committing.
|
||||
markRootSuspended(root, lanes);
|
||||
} else {
|
||||
// The render completed.
|
||||
// Check if this render may have yielded to a concurrent event, and if so,
|
||||
// confirm that any newly rendered stores are consistent.
|
||||
// TODO: It's possible that even a concurrent render may never have yielded
|
||||
// to the main thread, if it was fast enough, or if it expired. We could
|
||||
// skip the consistency check in that case, too.
|
||||
var renderWasConcurrent = !includesBlockingLane(root, lanes);
|
||||
var finishedWork = root.current.alternate;
|
||||
renderWasConcurrent = false; // Need to check the exit status again.
|
||||
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(finishedWork)
|
||||
) {
|
||||
// A store was mutated in an interleaved event. Render again,
|
||||
// synchronously, to block further mutations.
|
||||
exitStatus = renderRootSync(root, lanes); // We need to check again if something threw
|
||||
continue;
|
||||
} // Check if something threw
|
||||
|
||||
if (exitStatus === RootErrored) {
|
||||
var _originallyAttemptedLanes = lanes;
|
||||
|
||||
var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
var originallyAttemptedLanes = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
_originallyAttemptedLanes
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
|
||||
if (_errorRetryLanes !== NoLanes) {
|
||||
lanes = _errorRetryLanes;
|
||||
if (errorRetryLanes !== NoLanes) {
|
||||
lanes = errorRetryLanes;
|
||||
exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
_originallyAttemptedLanes,
|
||||
_errorRetryLanes
|
||||
); // We assume the tree is now consistent because we didn't yield to any
|
||||
// concurrent events.
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
);
|
||||
renderWasConcurrent = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (exitStatus === RootFatalErrored) {
|
||||
var _fatalError = workInProgressRootFatalError;
|
||||
var fatalError = workInProgressRootFatalError;
|
||||
prepareFreshStack(root, NoLanes);
|
||||
markRootSuspended(root, lanes);
|
||||
ensureRootIsScheduled(root);
|
||||
throw _fatalError;
|
||||
} // FIXME: Need to check for RootDidNotComplete again. The factoring here
|
||||
// isn't ideal.
|
||||
} // We now have a consistent tree. The next step is either to commit it,
|
||||
// or, if something suspended, wait to commit it after a timeout.
|
||||
throw fatalError;
|
||||
} // We now have a consistent tree. The next step is either to commit it,
|
||||
// or, if something suspended, wait to commit it after a timeout.
|
||||
|
||||
root.finishedWork = finishedWork;
|
||||
root.finishedLanes = lanes;
|
||||
finishConcurrentRender(root, exitStatus, finishedWork, lanes);
|
||||
}
|
||||
root.finishedWork = finishedWork;
|
||||
root.finishedLanes = lanes;
|
||||
finishConcurrentRender(root, exitStatus, finishedWork, lanes);
|
||||
}
|
||||
|
||||
break;
|
||||
} while (true);
|
||||
}
|
||||
|
||||
ensureRootIsScheduled(root);
|
||||
@@ -23982,7 +23961,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-canary-cb3404a0c-20230807";
|
||||
var ReactVersion = "18.3.0-canary-201becd3d-20230808";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
+96
-111
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<e70b9234d88c5c52a49b08d363575d3d>>
|
||||
* @generated SignedSource<<855c2a9f51c40c6c16565d44997b08cb>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -6467,56 +6467,39 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
didTimeout =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
var shouldTimeSlice =
|
||||
!includesBlockingLane(root, lanes) &&
|
||||
0 === (lanes & root.expiredLanes) &&
|
||||
!didTimeout;
|
||||
didTimeout = shouldTimeSlice
|
||||
? renderRootConcurrent(root, lanes)
|
||||
: renderRootSync(root, lanes);
|
||||
if (0 !== didTimeout) {
|
||||
if (2 === didTimeout) {
|
||||
var originallyAttemptedLanes = lanes,
|
||||
errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
markRootSuspended(root, lanes),
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === didTimeout) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
originallyAttemptedLanes = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(originallyAttemptedLanes)
|
||||
) {
|
||||
didTimeout = renderRootSync(root, lanes);
|
||||
var renderWasConcurrent = shouldTimeSlice;
|
||||
do {
|
||||
if (6 === didTimeout) markRootSuspended(root, lanes);
|
||||
else {
|
||||
shouldTimeSlice = root.current.alternate;
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(shouldTimeSlice)
|
||||
) {
|
||||
didTimeout = renderRootSync(root, lanes);
|
||||
renderWasConcurrent = !1;
|
||||
continue;
|
||||
}
|
||||
if (2 === didTimeout) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$103 = getLanesToRetrySynchronouslyOnError(
|
||||
renderWasConcurrent = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
errorRetryLanes
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes$103 &&
|
||||
((lanes = errorRetryLanes$103),
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$103
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
@@ -6527,56 +6510,58 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = originallyAttemptedLanes;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (didTimeout) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(root, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
((didTimeout = globalMostRecentFallbackTime + 300 - now()),
|
||||
10 < didTimeout)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
root.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
didTimeout
|
||||
root.finishedWork = shouldTimeSlice;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
renderWasConcurrent = root;
|
||||
switch (didTimeout) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
((didTimeout = globalMostRecentFallbackTime + 300 - now()),
|
||||
10 < didTimeout)
|
||||
) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
|
||||
renderWasConcurrent.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
renderWasConcurrent,
|
||||
shouldTimeSlice,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
didTimeout
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
renderWasConcurrent,
|
||||
shouldTimeSlice,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} while (1);
|
||||
}
|
||||
ensureRootIsScheduled(root);
|
||||
scheduleTaskForRootDuringMicrotask(root, now());
|
||||
@@ -6827,8 +6812,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$105) {
|
||||
handleThrow(root, thrownValue$105);
|
||||
} catch (thrownValue$102) {
|
||||
handleThrow(root, thrownValue$102);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -6936,8 +6921,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$107) {
|
||||
handleThrow(root, thrownValue$107);
|
||||
} catch (thrownValue$104) {
|
||||
handleThrow(root, thrownValue$104);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -8625,19 +8610,19 @@ function wrapFiber(fiber) {
|
||||
fiberToWrapper.set(fiber, wrapper));
|
||||
return wrapper;
|
||||
}
|
||||
var devToolsConfig$jscomp$inline_1032 = {
|
||||
var devToolsConfig$jscomp$inline_1029 = {
|
||||
findFiberByHostInstance: function () {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-cb3404a0c-20230807",
|
||||
version: "18.3.0-canary-201becd3d-20230808",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1231 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1032.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1032.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1032.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1032.rendererConfig,
|
||||
var internals$jscomp$inline_1228 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1029.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1029.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1029.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1029.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -8654,26 +8639,26 @@ var internals$jscomp$inline_1231 = {
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1032.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1029.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-cb3404a0c-20230807"
|
||||
reconcilerVersion: "18.3.0-canary-201becd3d-20230808"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1232 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1229 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1232.isDisabled &&
|
||||
hook$jscomp$inline_1232.supportsFiber
|
||||
!hook$jscomp$inline_1229.isDisabled &&
|
||||
hook$jscomp$inline_1229.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1232.inject(
|
||||
internals$jscomp$inline_1231
|
||||
(rendererID = hook$jscomp$inline_1229.inject(
|
||||
internals$jscomp$inline_1228
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1232);
|
||||
(injectedHook = hook$jscomp$inline_1229);
|
||||
} catch (err) {}
|
||||
}
|
||||
exports._Scheduler = Scheduler;
|
||||
|
||||
+96
-111
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<a5f2379fb57f61e507d9024de2cff2fc>>
|
||||
* @generated SignedSource<<ecceacf440b4791ce7dad51926bafd21>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -6807,56 +6807,39 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
didTimeout =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
var shouldTimeSlice =
|
||||
!includesBlockingLane(root, lanes) &&
|
||||
0 === (lanes & root.expiredLanes) &&
|
||||
!didTimeout;
|
||||
didTimeout = shouldTimeSlice
|
||||
? renderRootConcurrent(root, lanes)
|
||||
: renderRootSync(root, lanes);
|
||||
if (0 !== didTimeout) {
|
||||
if (2 === didTimeout) {
|
||||
var originallyAttemptedLanes = lanes,
|
||||
errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
markRootSuspended(root, lanes),
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === didTimeout) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
originallyAttemptedLanes = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(originallyAttemptedLanes)
|
||||
) {
|
||||
didTimeout = renderRootSync(root, lanes);
|
||||
var renderWasConcurrent = shouldTimeSlice;
|
||||
do {
|
||||
if (6 === didTimeout) markRootSuspended(root, lanes);
|
||||
else {
|
||||
shouldTimeSlice = root.current.alternate;
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(shouldTimeSlice)
|
||||
) {
|
||||
didTimeout = renderRootSync(root, lanes);
|
||||
renderWasConcurrent = !1;
|
||||
continue;
|
||||
}
|
||||
if (2 === didTimeout) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$116 = getLanesToRetrySynchronouslyOnError(
|
||||
renderWasConcurrent = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
errorRetryLanes
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes$116 &&
|
||||
((lanes = errorRetryLanes$116),
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$116
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
@@ -6867,56 +6850,58 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = originallyAttemptedLanes;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (didTimeout) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(root, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
((didTimeout = globalMostRecentFallbackTime + 300 - now$1()),
|
||||
10 < didTimeout)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
root.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
didTimeout
|
||||
root.finishedWork = shouldTimeSlice;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
renderWasConcurrent = root;
|
||||
switch (didTimeout) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
((didTimeout = globalMostRecentFallbackTime + 300 - now$1()),
|
||||
10 < didTimeout)
|
||||
) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
|
||||
renderWasConcurrent.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
renderWasConcurrent,
|
||||
shouldTimeSlice,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
didTimeout
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
renderWasConcurrent,
|
||||
shouldTimeSlice,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} while (1);
|
||||
}
|
||||
ensureRootIsScheduled(root);
|
||||
scheduleTaskForRootDuringMicrotask(root, now$1());
|
||||
@@ -7169,8 +7154,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$118) {
|
||||
handleThrow(root, thrownValue$118);
|
||||
} catch (thrownValue$115) {
|
||||
handleThrow(root, thrownValue$115);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -7278,8 +7263,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$120) {
|
||||
handleThrow(root, thrownValue$120);
|
||||
} catch (thrownValue$117) {
|
||||
handleThrow(root, thrownValue$117);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -9051,19 +9036,19 @@ function wrapFiber(fiber) {
|
||||
fiberToWrapper.set(fiber, wrapper));
|
||||
return wrapper;
|
||||
}
|
||||
var devToolsConfig$jscomp$inline_1074 = {
|
||||
var devToolsConfig$jscomp$inline_1071 = {
|
||||
findFiberByHostInstance: function () {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-cb3404a0c-20230807",
|
||||
version: "18.3.0-canary-201becd3d-20230808",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1272 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1074.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1074.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1074.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1074.rendererConfig,
|
||||
var internals$jscomp$inline_1269 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1071.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1071.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1071.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1071.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -9080,26 +9065,26 @@ var internals$jscomp$inline_1272 = {
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1074.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1071.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-cb3404a0c-20230807"
|
||||
reconcilerVersion: "18.3.0-canary-201becd3d-20230808"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1273 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1270 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1273.isDisabled &&
|
||||
hook$jscomp$inline_1273.supportsFiber
|
||||
!hook$jscomp$inline_1270.isDisabled &&
|
||||
hook$jscomp$inline_1270.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1273.inject(
|
||||
internals$jscomp$inline_1272
|
||||
(rendererID = hook$jscomp$inline_1270.inject(
|
||||
internals$jscomp$inline_1269
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1273);
|
||||
(injectedHook = hook$jscomp$inline_1270);
|
||||
} catch (err) {}
|
||||
}
|
||||
exports._Scheduler = Scheduler;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ if (
|
||||
}
|
||||
"use strict";
|
||||
|
||||
var ReactVersion = "18.3.0-canary-cb3404a0c-20230807";
|
||||
var ReactVersion = "18.3.0-canary-201becd3d-20230808";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
+1
-1
@@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-canary-cb3404a0c-20230807";
|
||||
exports.version = "18.3.0-canary-201becd3d-20230808";
|
||||
|
||||
+1
-1
@@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-canary-cb3404a0c-20230807";
|
||||
exports.version = "18.3.0-canary-201becd3d-20230808";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
cb3404a0ccd8b5edf5d2b90bd844742090e38f42
|
||||
201becd3d294b38824930a818e3412c6e04ba2eb
|
||||
|
||||
+48
-69
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<8e7e35f7d6ee020f57b9bb22ec115fac>>
|
||||
* @generated SignedSource<<f5db62e02d19802b5066cf19e197da50>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -23144,92 +23144,71 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
: renderRootSync(root, lanes);
|
||||
|
||||
if (exitStatus !== RootInProgress) {
|
||||
if (exitStatus === RootErrored) {
|
||||
// If something threw an error, try rendering one more time. We'll
|
||||
// render synchronously to block concurrent data mutations, and we'll
|
||||
// includes all pending updates are included. If it still fails after
|
||||
// the second attempt, we'll give up and commit the resulting tree.
|
||||
var originallyAttemptedLanes = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
var renderWasConcurrent = shouldTimeSlice;
|
||||
|
||||
if (errorRetryLanes !== NoLanes) {
|
||||
lanes = errorRetryLanes;
|
||||
exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
);
|
||||
}
|
||||
}
|
||||
do {
|
||||
if (exitStatus === RootDidNotComplete) {
|
||||
// The render unwound without completing the tree. This happens in special
|
||||
// cases where need to exit the current render without producing a
|
||||
// consistent tree or committing.
|
||||
markRootSuspended(root, lanes);
|
||||
} else {
|
||||
// The render completed.
|
||||
// Check if this render may have yielded to a concurrent event, and if so,
|
||||
// confirm that any newly rendered stores are consistent.
|
||||
// TODO: It's possible that even a concurrent render may never have yielded
|
||||
// to the main thread, if it was fast enough, or if it expired. We could
|
||||
// skip the consistency check in that case, too.
|
||||
var finishedWork = root.current.alternate;
|
||||
|
||||
if (exitStatus === RootFatalErrored) {
|
||||
var fatalError = workInProgressRootFatalError;
|
||||
prepareFreshStack(root, NoLanes);
|
||||
markRootSuspended(root, lanes);
|
||||
ensureRootIsScheduled(root);
|
||||
throw fatalError;
|
||||
}
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(finishedWork)
|
||||
) {
|
||||
// A store was mutated in an interleaved event. Render again,
|
||||
// synchronously, to block further mutations.
|
||||
exitStatus = renderRootSync(root, lanes); // We assume the tree is now consistent because we didn't yield to any
|
||||
// concurrent events.
|
||||
|
||||
if (exitStatus === RootDidNotComplete) {
|
||||
// The render unwound without completing the tree. This happens in special
|
||||
// cases where need to exit the current render without producing a
|
||||
// consistent tree or committing.
|
||||
markRootSuspended(root, lanes);
|
||||
} else {
|
||||
// The render completed.
|
||||
// Check if this render may have yielded to a concurrent event, and if so,
|
||||
// confirm that any newly rendered stores are consistent.
|
||||
// TODO: It's possible that even a concurrent render may never have yielded
|
||||
// to the main thread, if it was fast enough, or if it expired. We could
|
||||
// skip the consistency check in that case, too.
|
||||
var renderWasConcurrent = !includesBlockingLane(root, lanes);
|
||||
var finishedWork = root.current.alternate;
|
||||
renderWasConcurrent = false; // Need to check the exit status again.
|
||||
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(finishedWork)
|
||||
) {
|
||||
// A store was mutated in an interleaved event. Render again,
|
||||
// synchronously, to block further mutations.
|
||||
exitStatus = renderRootSync(root, lanes); // We need to check again if something threw
|
||||
continue;
|
||||
} // Check if something threw
|
||||
|
||||
if (exitStatus === RootErrored) {
|
||||
var _originallyAttemptedLanes = lanes;
|
||||
|
||||
var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
var originallyAttemptedLanes = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
_originallyAttemptedLanes
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
|
||||
if (_errorRetryLanes !== NoLanes) {
|
||||
lanes = _errorRetryLanes;
|
||||
if (errorRetryLanes !== NoLanes) {
|
||||
lanes = errorRetryLanes;
|
||||
exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
_originallyAttemptedLanes,
|
||||
_errorRetryLanes
|
||||
); // We assume the tree is now consistent because we didn't yield to any
|
||||
// concurrent events.
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
);
|
||||
renderWasConcurrent = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (exitStatus === RootFatalErrored) {
|
||||
var _fatalError = workInProgressRootFatalError;
|
||||
var fatalError = workInProgressRootFatalError;
|
||||
prepareFreshStack(root, NoLanes);
|
||||
markRootSuspended(root, lanes);
|
||||
ensureRootIsScheduled(root);
|
||||
throw _fatalError;
|
||||
} // FIXME: Need to check for RootDidNotComplete again. The factoring here
|
||||
// isn't ideal.
|
||||
} // We now have a consistent tree. The next step is either to commit it,
|
||||
// or, if something suspended, wait to commit it after a timeout.
|
||||
throw fatalError;
|
||||
} // We now have a consistent tree. The next step is either to commit it,
|
||||
// or, if something suspended, wait to commit it after a timeout.
|
||||
|
||||
root.finishedWork = finishedWork;
|
||||
root.finishedLanes = lanes;
|
||||
finishConcurrentRender(root, exitStatus, finishedWork, lanes);
|
||||
}
|
||||
root.finishedWork = finishedWork;
|
||||
root.finishedLanes = lanes;
|
||||
finishConcurrentRender(root, exitStatus, finishedWork, lanes);
|
||||
}
|
||||
|
||||
break;
|
||||
} while (true);
|
||||
}
|
||||
|
||||
ensureRootIsScheduled(root);
|
||||
@@ -27021,7 +27000,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-canary-87dd5675";
|
||||
var ReactVersion = "18.3.0-canary-4660271e";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
+113
-129
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<23a36138dca05b18c63f619db0604fe8>>
|
||||
* @generated SignedSource<<3106445be52c70579494ac9a4777c8df>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -940,7 +940,7 @@ eventPluginOrder = Array.prototype.slice.call([
|
||||
"ReactNativeBridgeEventPlugin"
|
||||
]);
|
||||
recomputePluginOrdering();
|
||||
var injectedNamesToPlugins$jscomp$inline_239 = {
|
||||
var injectedNamesToPlugins$jscomp$inline_236 = {
|
||||
ResponderEventPlugin: ResponderEventPlugin,
|
||||
ReactNativeBridgeEventPlugin: {
|
||||
eventTypes: {},
|
||||
@@ -986,32 +986,32 @@ var injectedNamesToPlugins$jscomp$inline_239 = {
|
||||
}
|
||||
}
|
||||
},
|
||||
isOrderingDirty$jscomp$inline_240 = !1,
|
||||
pluginName$jscomp$inline_241;
|
||||
for (pluginName$jscomp$inline_241 in injectedNamesToPlugins$jscomp$inline_239)
|
||||
isOrderingDirty$jscomp$inline_237 = !1,
|
||||
pluginName$jscomp$inline_238;
|
||||
for (pluginName$jscomp$inline_238 in injectedNamesToPlugins$jscomp$inline_236)
|
||||
if (
|
||||
injectedNamesToPlugins$jscomp$inline_239.hasOwnProperty(
|
||||
pluginName$jscomp$inline_241
|
||||
injectedNamesToPlugins$jscomp$inline_236.hasOwnProperty(
|
||||
pluginName$jscomp$inline_238
|
||||
)
|
||||
) {
|
||||
var pluginModule$jscomp$inline_242 =
|
||||
injectedNamesToPlugins$jscomp$inline_239[pluginName$jscomp$inline_241];
|
||||
var pluginModule$jscomp$inline_239 =
|
||||
injectedNamesToPlugins$jscomp$inline_236[pluginName$jscomp$inline_238];
|
||||
if (
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_241) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_241] !==
|
||||
pluginModule$jscomp$inline_242
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_238) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_238] !==
|
||||
pluginModule$jscomp$inline_239
|
||||
) {
|
||||
if (namesToPlugins[pluginName$jscomp$inline_241])
|
||||
if (namesToPlugins[pluginName$jscomp$inline_238])
|
||||
throw Error(
|
||||
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
|
||||
(pluginName$jscomp$inline_241 + "`.")
|
||||
(pluginName$jscomp$inline_238 + "`.")
|
||||
);
|
||||
namesToPlugins[pluginName$jscomp$inline_241] =
|
||||
pluginModule$jscomp$inline_242;
|
||||
isOrderingDirty$jscomp$inline_240 = !0;
|
||||
namesToPlugins[pluginName$jscomp$inline_238] =
|
||||
pluginModule$jscomp$inline_239;
|
||||
isOrderingDirty$jscomp$inline_237 = !0;
|
||||
}
|
||||
}
|
||||
isOrderingDirty$jscomp$inline_240 && recomputePluginOrdering();
|
||||
isOrderingDirty$jscomp$inline_237 && recomputePluginOrdering();
|
||||
var emptyObject$1 = {},
|
||||
removedKeys = null,
|
||||
removedKeyCount = 0,
|
||||
@@ -7491,56 +7491,38 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
var exitStatus =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
var exitStatus = (didTimeout =
|
||||
!includesBlockingLane(root, lanes) &&
|
||||
0 === (lanes & root.expiredLanes) &&
|
||||
!didTimeout)
|
||||
? renderRootConcurrent(root, lanes)
|
||||
: renderRootSync(root, lanes);
|
||||
if (0 !== exitStatus) {
|
||||
if (2 === exitStatus) {
|
||||
didTimeout = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
didTimeout
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
didTimeout,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
markRootSuspended(root, lanes),
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
var renderWasConcurrent = didTimeout;
|
||||
do {
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
renderWasConcurrent = !1;
|
||||
continue;
|
||||
}
|
||||
if (2 === exitStatus) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$93 = getLanesToRetrySynchronouslyOnError(
|
||||
renderWasConcurrent = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
errorRetryLanes
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes$93 &&
|
||||
((lanes = errorRetryLanes$93),
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$93
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === exitStatus)
|
||||
@@ -7551,57 +7533,59 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(root, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 300 - now()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
root.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
exitStatus
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
renderWasConcurrent = root;
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 300 - now()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
|
||||
renderWasConcurrent.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
renderWasConcurrent,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
exitStatus
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
renderWasConcurrent,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} while (1);
|
||||
}
|
||||
ensureRootIsScheduled(root);
|
||||
scheduleTaskForRootDuringMicrotask(root, now());
|
||||
@@ -7823,8 +7807,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$95) {
|
||||
handleThrow(root, thrownValue$95);
|
||||
} catch (thrownValue$92) {
|
||||
handleThrow(root, thrownValue$92);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -7930,8 +7914,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$97) {
|
||||
handleThrow(root, thrownValue$97);
|
||||
} catch (thrownValue$94) {
|
||||
handleThrow(root, thrownValue$94);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -9434,10 +9418,10 @@ batchedUpdatesImpl = function (fn, a) {
|
||||
}
|
||||
};
|
||||
var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1043 = {
|
||||
devToolsConfig$jscomp$inline_1040 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-2909dc0f",
|
||||
version: "18.3.0-canary-25ec80db",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -9453,11 +9437,11 @@ var roots = new Map(),
|
||||
}.bind(null, findNodeHandle)
|
||||
}
|
||||
};
|
||||
var internals$jscomp$inline_1285 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1043.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1043.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1043.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1043.rendererConfig,
|
||||
var internals$jscomp$inline_1282 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1040.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1040.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1040.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1040.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -9473,26 +9457,26 @@ var internals$jscomp$inline_1285 = {
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1043.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1040.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-2909dc0f"
|
||||
reconcilerVersion: "18.3.0-canary-25ec80db"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1286 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1283 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1286.isDisabled &&
|
||||
hook$jscomp$inline_1286.supportsFiber
|
||||
!hook$jscomp$inline_1283.isDisabled &&
|
||||
hook$jscomp$inline_1283.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1286.inject(
|
||||
internals$jscomp$inline_1285
|
||||
(rendererID = hook$jscomp$inline_1283.inject(
|
||||
internals$jscomp$inline_1282
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1286);
|
||||
(injectedHook = hook$jscomp$inline_1283);
|
||||
} catch (err) {}
|
||||
}
|
||||
exports.createPortal = function (children, containerTag) {
|
||||
|
||||
+106
-122
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<8be594306336f0dfd259c6d9967213f6>>
|
||||
* @generated SignedSource<<c1ea48b0dca5ef0a4eef09df56e52033>>
|
||||
*/
|
||||
|
||||
|
||||
@@ -951,7 +951,7 @@ eventPluginOrder = Array.prototype.slice.call([
|
||||
"ReactNativeBridgeEventPlugin"
|
||||
]);
|
||||
recomputePluginOrdering();
|
||||
var injectedNamesToPlugins$jscomp$inline_255 = {
|
||||
var injectedNamesToPlugins$jscomp$inline_252 = {
|
||||
ResponderEventPlugin: ResponderEventPlugin,
|
||||
ReactNativeBridgeEventPlugin: {
|
||||
eventTypes: {},
|
||||
@@ -997,32 +997,32 @@ var injectedNamesToPlugins$jscomp$inline_255 = {
|
||||
}
|
||||
}
|
||||
},
|
||||
isOrderingDirty$jscomp$inline_256 = !1,
|
||||
pluginName$jscomp$inline_257;
|
||||
for (pluginName$jscomp$inline_257 in injectedNamesToPlugins$jscomp$inline_255)
|
||||
isOrderingDirty$jscomp$inline_253 = !1,
|
||||
pluginName$jscomp$inline_254;
|
||||
for (pluginName$jscomp$inline_254 in injectedNamesToPlugins$jscomp$inline_252)
|
||||
if (
|
||||
injectedNamesToPlugins$jscomp$inline_255.hasOwnProperty(
|
||||
pluginName$jscomp$inline_257
|
||||
injectedNamesToPlugins$jscomp$inline_252.hasOwnProperty(
|
||||
pluginName$jscomp$inline_254
|
||||
)
|
||||
) {
|
||||
var pluginModule$jscomp$inline_258 =
|
||||
injectedNamesToPlugins$jscomp$inline_255[pluginName$jscomp$inline_257];
|
||||
var pluginModule$jscomp$inline_255 =
|
||||
injectedNamesToPlugins$jscomp$inline_252[pluginName$jscomp$inline_254];
|
||||
if (
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_257) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_257] !==
|
||||
pluginModule$jscomp$inline_258
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_254) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_254] !==
|
||||
pluginModule$jscomp$inline_255
|
||||
) {
|
||||
if (namesToPlugins[pluginName$jscomp$inline_257])
|
||||
if (namesToPlugins[pluginName$jscomp$inline_254])
|
||||
throw Error(
|
||||
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
|
||||
(pluginName$jscomp$inline_257 + "`.")
|
||||
(pluginName$jscomp$inline_254 + "`.")
|
||||
);
|
||||
namesToPlugins[pluginName$jscomp$inline_257] =
|
||||
pluginModule$jscomp$inline_258;
|
||||
isOrderingDirty$jscomp$inline_256 = !0;
|
||||
namesToPlugins[pluginName$jscomp$inline_254] =
|
||||
pluginModule$jscomp$inline_255;
|
||||
isOrderingDirty$jscomp$inline_253 = !0;
|
||||
}
|
||||
}
|
||||
isOrderingDirty$jscomp$inline_256 && recomputePluginOrdering();
|
||||
isOrderingDirty$jscomp$inline_253 && recomputePluginOrdering();
|
||||
var emptyObject$1 = {},
|
||||
removedKeys = null,
|
||||
removedKeyCount = 0,
|
||||
@@ -8022,56 +8022,38 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
var exitStatus =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
var exitStatus = (didTimeout =
|
||||
!includesBlockingLane(root, lanes) &&
|
||||
0 === (lanes & root.expiredLanes) &&
|
||||
!didTimeout)
|
||||
? renderRootConcurrent(root, lanes)
|
||||
: renderRootSync(root, lanes);
|
||||
if (0 !== exitStatus) {
|
||||
if (2 === exitStatus) {
|
||||
didTimeout = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
didTimeout
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
didTimeout,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
markRootSuspended(root, lanes),
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
var renderWasConcurrent = didTimeout;
|
||||
do {
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
renderWasConcurrent = !1;
|
||||
continue;
|
||||
}
|
||||
if (2 === exitStatus) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$109 = getLanesToRetrySynchronouslyOnError(
|
||||
renderWasConcurrent = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
errorRetryLanes
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes$109 &&
|
||||
((lanes = errorRetryLanes$109),
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$109
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === exitStatus)
|
||||
@@ -8082,57 +8064,59 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(root, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 300 - now$1()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
root.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
exitStatus
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
renderWasConcurrent = root;
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 300 - now$1()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
|
||||
renderWasConcurrent.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
renderWasConcurrent,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
exitStatus
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
renderWasConcurrent,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} while (1);
|
||||
}
|
||||
ensureRootIsScheduled(root);
|
||||
scheduleTaskForRootDuringMicrotask(root, now$1());
|
||||
@@ -8392,8 +8376,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$111) {
|
||||
handleThrow(root, thrownValue$111);
|
||||
} catch (thrownValue$108) {
|
||||
handleThrow(root, thrownValue$108);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -8510,8 +8494,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$113) {
|
||||
handleThrow(root, thrownValue$113);
|
||||
} catch (thrownValue$110) {
|
||||
handleThrow(root, thrownValue$110);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -10142,10 +10126,10 @@ batchedUpdatesImpl = function (fn, a) {
|
||||
}
|
||||
};
|
||||
var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1121 = {
|
||||
devToolsConfig$jscomp$inline_1118 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-c0169ce2",
|
||||
version: "18.3.0-canary-d46b694e",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -10175,10 +10159,10 @@ var roots = new Map(),
|
||||
} catch (err) {}
|
||||
return hook.checkDCE ? !0 : !1;
|
||||
})({
|
||||
bundleType: devToolsConfig$jscomp$inline_1121.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1121.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1121.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1121.rendererConfig,
|
||||
bundleType: devToolsConfig$jscomp$inline_1118.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1118.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1118.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1118.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -10194,14 +10178,14 @@ var roots = new Map(),
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1121.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1118.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-c0169ce2"
|
||||
reconcilerVersion: "18.3.0-canary-d46b694e"
|
||||
});
|
||||
exports.createPortal = function (children, containerTag) {
|
||||
return createPortal$1(
|
||||
|
||||
+48
-69
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<545e4301f5f214515ca8cb0638f36c59>>
|
||||
* @generated SignedSource<<ed79c71af10caa287c316372d4675ed5>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -23658,92 +23658,71 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
: renderRootSync(root, lanes);
|
||||
|
||||
if (exitStatus !== RootInProgress) {
|
||||
if (exitStatus === RootErrored) {
|
||||
// If something threw an error, try rendering one more time. We'll
|
||||
// render synchronously to block concurrent data mutations, and we'll
|
||||
// includes all pending updates are included. If it still fails after
|
||||
// the second attempt, we'll give up and commit the resulting tree.
|
||||
var originallyAttemptedLanes = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
var renderWasConcurrent = shouldTimeSlice;
|
||||
|
||||
if (errorRetryLanes !== NoLanes) {
|
||||
lanes = errorRetryLanes;
|
||||
exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
);
|
||||
}
|
||||
}
|
||||
do {
|
||||
if (exitStatus === RootDidNotComplete) {
|
||||
// The render unwound without completing the tree. This happens in special
|
||||
// cases where need to exit the current render without producing a
|
||||
// consistent tree or committing.
|
||||
markRootSuspended(root, lanes);
|
||||
} else {
|
||||
// The render completed.
|
||||
// Check if this render may have yielded to a concurrent event, and if so,
|
||||
// confirm that any newly rendered stores are consistent.
|
||||
// TODO: It's possible that even a concurrent render may never have yielded
|
||||
// to the main thread, if it was fast enough, or if it expired. We could
|
||||
// skip the consistency check in that case, too.
|
||||
var finishedWork = root.current.alternate;
|
||||
|
||||
if (exitStatus === RootFatalErrored) {
|
||||
var fatalError = workInProgressRootFatalError;
|
||||
prepareFreshStack(root, NoLanes);
|
||||
markRootSuspended(root, lanes);
|
||||
ensureRootIsScheduled(root);
|
||||
throw fatalError;
|
||||
}
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(finishedWork)
|
||||
) {
|
||||
// A store was mutated in an interleaved event. Render again,
|
||||
// synchronously, to block further mutations.
|
||||
exitStatus = renderRootSync(root, lanes); // We assume the tree is now consistent because we didn't yield to any
|
||||
// concurrent events.
|
||||
|
||||
if (exitStatus === RootDidNotComplete) {
|
||||
// The render unwound without completing the tree. This happens in special
|
||||
// cases where need to exit the current render without producing a
|
||||
// consistent tree or committing.
|
||||
markRootSuspended(root, lanes);
|
||||
} else {
|
||||
// The render completed.
|
||||
// Check if this render may have yielded to a concurrent event, and if so,
|
||||
// confirm that any newly rendered stores are consistent.
|
||||
// TODO: It's possible that even a concurrent render may never have yielded
|
||||
// to the main thread, if it was fast enough, or if it expired. We could
|
||||
// skip the consistency check in that case, too.
|
||||
var renderWasConcurrent = !includesBlockingLane(root, lanes);
|
||||
var finishedWork = root.current.alternate;
|
||||
renderWasConcurrent = false; // Need to check the exit status again.
|
||||
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(finishedWork)
|
||||
) {
|
||||
// A store was mutated in an interleaved event. Render again,
|
||||
// synchronously, to block further mutations.
|
||||
exitStatus = renderRootSync(root, lanes); // We need to check again if something threw
|
||||
continue;
|
||||
} // Check if something threw
|
||||
|
||||
if (exitStatus === RootErrored) {
|
||||
var _originallyAttemptedLanes = lanes;
|
||||
|
||||
var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
var originallyAttemptedLanes = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
_originallyAttemptedLanes
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
|
||||
if (_errorRetryLanes !== NoLanes) {
|
||||
lanes = _errorRetryLanes;
|
||||
if (errorRetryLanes !== NoLanes) {
|
||||
lanes = errorRetryLanes;
|
||||
exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
_originallyAttemptedLanes,
|
||||
_errorRetryLanes
|
||||
); // We assume the tree is now consistent because we didn't yield to any
|
||||
// concurrent events.
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
);
|
||||
renderWasConcurrent = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (exitStatus === RootFatalErrored) {
|
||||
var _fatalError = workInProgressRootFatalError;
|
||||
var fatalError = workInProgressRootFatalError;
|
||||
prepareFreshStack(root, NoLanes);
|
||||
markRootSuspended(root, lanes);
|
||||
ensureRootIsScheduled(root);
|
||||
throw _fatalError;
|
||||
} // FIXME: Need to check for RootDidNotComplete again. The factoring here
|
||||
// isn't ideal.
|
||||
} // We now have a consistent tree. The next step is either to commit it,
|
||||
// or, if something suspended, wait to commit it after a timeout.
|
||||
throw fatalError;
|
||||
} // We now have a consistent tree. The next step is either to commit it,
|
||||
// or, if something suspended, wait to commit it after a timeout.
|
||||
|
||||
root.finishedWork = finishedWork;
|
||||
root.finishedLanes = lanes;
|
||||
finishConcurrentRender(root, exitStatus, finishedWork, lanes);
|
||||
}
|
||||
root.finishedWork = finishedWork;
|
||||
root.finishedLanes = lanes;
|
||||
finishConcurrentRender(root, exitStatus, finishedWork, lanes);
|
||||
}
|
||||
|
||||
break;
|
||||
} while (true);
|
||||
}
|
||||
|
||||
ensureRootIsScheduled(root);
|
||||
@@ -27535,7 +27514,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-canary-bc0efd98";
|
||||
var ReactVersion = "18.3.0-canary-4e7ec9ef";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
+113
-129
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<3335b1ac142aefffdb7b1c801c3c37e8>>
|
||||
* @generated SignedSource<<51235cc0d10c7c67758da65bf9e82cd7>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -940,7 +940,7 @@ eventPluginOrder = Array.prototype.slice.call([
|
||||
"ReactNativeBridgeEventPlugin"
|
||||
]);
|
||||
recomputePluginOrdering();
|
||||
var injectedNamesToPlugins$jscomp$inline_245 = {
|
||||
var injectedNamesToPlugins$jscomp$inline_242 = {
|
||||
ResponderEventPlugin: ResponderEventPlugin,
|
||||
ReactNativeBridgeEventPlugin: {
|
||||
eventTypes: {},
|
||||
@@ -986,32 +986,32 @@ var injectedNamesToPlugins$jscomp$inline_245 = {
|
||||
}
|
||||
}
|
||||
},
|
||||
isOrderingDirty$jscomp$inline_246 = !1,
|
||||
pluginName$jscomp$inline_247;
|
||||
for (pluginName$jscomp$inline_247 in injectedNamesToPlugins$jscomp$inline_245)
|
||||
isOrderingDirty$jscomp$inline_243 = !1,
|
||||
pluginName$jscomp$inline_244;
|
||||
for (pluginName$jscomp$inline_244 in injectedNamesToPlugins$jscomp$inline_242)
|
||||
if (
|
||||
injectedNamesToPlugins$jscomp$inline_245.hasOwnProperty(
|
||||
pluginName$jscomp$inline_247
|
||||
injectedNamesToPlugins$jscomp$inline_242.hasOwnProperty(
|
||||
pluginName$jscomp$inline_244
|
||||
)
|
||||
) {
|
||||
var pluginModule$jscomp$inline_248 =
|
||||
injectedNamesToPlugins$jscomp$inline_245[pluginName$jscomp$inline_247];
|
||||
var pluginModule$jscomp$inline_245 =
|
||||
injectedNamesToPlugins$jscomp$inline_242[pluginName$jscomp$inline_244];
|
||||
if (
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_247) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_247] !==
|
||||
pluginModule$jscomp$inline_248
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_244) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_244] !==
|
||||
pluginModule$jscomp$inline_245
|
||||
) {
|
||||
if (namesToPlugins[pluginName$jscomp$inline_247])
|
||||
if (namesToPlugins[pluginName$jscomp$inline_244])
|
||||
throw Error(
|
||||
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
|
||||
(pluginName$jscomp$inline_247 + "`.")
|
||||
(pluginName$jscomp$inline_244 + "`.")
|
||||
);
|
||||
namesToPlugins[pluginName$jscomp$inline_247] =
|
||||
pluginModule$jscomp$inline_248;
|
||||
isOrderingDirty$jscomp$inline_246 = !0;
|
||||
namesToPlugins[pluginName$jscomp$inline_244] =
|
||||
pluginModule$jscomp$inline_245;
|
||||
isOrderingDirty$jscomp$inline_243 = !0;
|
||||
}
|
||||
}
|
||||
isOrderingDirty$jscomp$inline_246 && recomputePluginOrdering();
|
||||
isOrderingDirty$jscomp$inline_243 && recomputePluginOrdering();
|
||||
var instanceCache = new Map(),
|
||||
instanceProps = new Map();
|
||||
function getInstanceFromTag(tag) {
|
||||
@@ -7740,56 +7740,38 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
var exitStatus =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
var exitStatus = (didTimeout =
|
||||
!includesBlockingLane(root, lanes) &&
|
||||
0 === (lanes & root.expiredLanes) &&
|
||||
!didTimeout)
|
||||
? renderRootConcurrent(root, lanes)
|
||||
: renderRootSync(root, lanes);
|
||||
if (0 !== exitStatus) {
|
||||
if (2 === exitStatus) {
|
||||
didTimeout = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
didTimeout
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
didTimeout,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
markRootSuspended(root, lanes),
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
var renderWasConcurrent = didTimeout;
|
||||
do {
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
renderWasConcurrent = !1;
|
||||
continue;
|
||||
}
|
||||
if (2 === exitStatus) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$99 = getLanesToRetrySynchronouslyOnError(
|
||||
renderWasConcurrent = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
errorRetryLanes
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes$99 &&
|
||||
((lanes = errorRetryLanes$99),
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$99
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === exitStatus)
|
||||
@@ -7800,57 +7782,59 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(root, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 300 - now()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
root.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
exitStatus
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
renderWasConcurrent = root;
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 300 - now()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
|
||||
renderWasConcurrent.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
renderWasConcurrent,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
exitStatus
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
renderWasConcurrent,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} while (1);
|
||||
}
|
||||
ensureRootIsScheduled(root);
|
||||
scheduleTaskForRootDuringMicrotask(root, now());
|
||||
@@ -8072,8 +8056,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$101) {
|
||||
handleThrow(root, thrownValue$101);
|
||||
} catch (thrownValue$98) {
|
||||
handleThrow(root, thrownValue$98);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -8179,8 +8163,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$103) {
|
||||
handleThrow(root, thrownValue$103);
|
||||
} catch (thrownValue$100) {
|
||||
handleThrow(root, thrownValue$100);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -9690,10 +9674,10 @@ batchedUpdatesImpl = function (fn, a) {
|
||||
}
|
||||
};
|
||||
var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1098 = {
|
||||
devToolsConfig$jscomp$inline_1095 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-85b40236",
|
||||
version: "18.3.0-canary-37d552e6",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -9709,11 +9693,11 @@ var roots = new Map(),
|
||||
}.bind(null, findNodeHandle)
|
||||
}
|
||||
};
|
||||
var internals$jscomp$inline_1354 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1098.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1098.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1098.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1098.rendererConfig,
|
||||
var internals$jscomp$inline_1351 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1095.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1095.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1095.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1095.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -9729,26 +9713,26 @@ var internals$jscomp$inline_1354 = {
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1098.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1095.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-85b40236"
|
||||
reconcilerVersion: "18.3.0-canary-37d552e6"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1355 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1352 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1355.isDisabled &&
|
||||
hook$jscomp$inline_1355.supportsFiber
|
||||
!hook$jscomp$inline_1352.isDisabled &&
|
||||
hook$jscomp$inline_1352.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1355.inject(
|
||||
internals$jscomp$inline_1354
|
||||
(rendererID = hook$jscomp$inline_1352.inject(
|
||||
internals$jscomp$inline_1351
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1355);
|
||||
(injectedHook = hook$jscomp$inline_1352);
|
||||
} catch (err) {}
|
||||
}
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
|
||||
|
||||
+106
-122
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<228060d251b47b2b0be7969dec80e0a0>>
|
||||
* @generated SignedSource<<db5216c118a6ffba38296edfa8b84596>>
|
||||
*/
|
||||
|
||||
|
||||
@@ -951,7 +951,7 @@ eventPluginOrder = Array.prototype.slice.call([
|
||||
"ReactNativeBridgeEventPlugin"
|
||||
]);
|
||||
recomputePluginOrdering();
|
||||
var injectedNamesToPlugins$jscomp$inline_261 = {
|
||||
var injectedNamesToPlugins$jscomp$inline_258 = {
|
||||
ResponderEventPlugin: ResponderEventPlugin,
|
||||
ReactNativeBridgeEventPlugin: {
|
||||
eventTypes: {},
|
||||
@@ -997,32 +997,32 @@ var injectedNamesToPlugins$jscomp$inline_261 = {
|
||||
}
|
||||
}
|
||||
},
|
||||
isOrderingDirty$jscomp$inline_262 = !1,
|
||||
pluginName$jscomp$inline_263;
|
||||
for (pluginName$jscomp$inline_263 in injectedNamesToPlugins$jscomp$inline_261)
|
||||
isOrderingDirty$jscomp$inline_259 = !1,
|
||||
pluginName$jscomp$inline_260;
|
||||
for (pluginName$jscomp$inline_260 in injectedNamesToPlugins$jscomp$inline_258)
|
||||
if (
|
||||
injectedNamesToPlugins$jscomp$inline_261.hasOwnProperty(
|
||||
pluginName$jscomp$inline_263
|
||||
injectedNamesToPlugins$jscomp$inline_258.hasOwnProperty(
|
||||
pluginName$jscomp$inline_260
|
||||
)
|
||||
) {
|
||||
var pluginModule$jscomp$inline_264 =
|
||||
injectedNamesToPlugins$jscomp$inline_261[pluginName$jscomp$inline_263];
|
||||
var pluginModule$jscomp$inline_261 =
|
||||
injectedNamesToPlugins$jscomp$inline_258[pluginName$jscomp$inline_260];
|
||||
if (
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_263) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_263] !==
|
||||
pluginModule$jscomp$inline_264
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_260) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_260] !==
|
||||
pluginModule$jscomp$inline_261
|
||||
) {
|
||||
if (namesToPlugins[pluginName$jscomp$inline_263])
|
||||
if (namesToPlugins[pluginName$jscomp$inline_260])
|
||||
throw Error(
|
||||
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
|
||||
(pluginName$jscomp$inline_263 + "`.")
|
||||
(pluginName$jscomp$inline_260 + "`.")
|
||||
);
|
||||
namesToPlugins[pluginName$jscomp$inline_263] =
|
||||
pluginModule$jscomp$inline_264;
|
||||
isOrderingDirty$jscomp$inline_262 = !0;
|
||||
namesToPlugins[pluginName$jscomp$inline_260] =
|
||||
pluginModule$jscomp$inline_261;
|
||||
isOrderingDirty$jscomp$inline_259 = !0;
|
||||
}
|
||||
}
|
||||
isOrderingDirty$jscomp$inline_262 && recomputePluginOrdering();
|
||||
isOrderingDirty$jscomp$inline_259 && recomputePluginOrdering();
|
||||
var instanceCache = new Map(),
|
||||
instanceProps = new Map();
|
||||
function getInstanceFromTag(tag) {
|
||||
@@ -8271,56 +8271,38 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
var exitStatus =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
var exitStatus = (didTimeout =
|
||||
!includesBlockingLane(root, lanes) &&
|
||||
0 === (lanes & root.expiredLanes) &&
|
||||
!didTimeout)
|
||||
? renderRootConcurrent(root, lanes)
|
||||
: renderRootSync(root, lanes);
|
||||
if (0 !== exitStatus) {
|
||||
if (2 === exitStatus) {
|
||||
didTimeout = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
didTimeout
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
didTimeout,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
markRootSuspended(root, lanes),
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
var renderWasConcurrent = didTimeout;
|
||||
do {
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
renderWasConcurrent &&
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
renderWasConcurrent = !1;
|
||||
continue;
|
||||
}
|
||||
if (2 === exitStatus) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$115 = getLanesToRetrySynchronouslyOnError(
|
||||
renderWasConcurrent = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
errorRetryLanes
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes$115 &&
|
||||
((lanes = errorRetryLanes$115),
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$115
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === exitStatus)
|
||||
@@ -8331,57 +8313,59 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(root, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 300 - now$1()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
root.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
exitStatus
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
renderWasConcurrent = root;
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
case 4:
|
||||
if ((lanes & 8388480) === lanes) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
break a;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
throw Error("Unknown root exit status.");
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 300 - now$1()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(renderWasConcurrent, lanes);
|
||||
if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
|
||||
renderWasConcurrent.timeoutHandle = scheduleTimeout(
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
renderWasConcurrent,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
exitStatus
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
renderWasConcurrent,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} while (1);
|
||||
}
|
||||
ensureRootIsScheduled(root);
|
||||
scheduleTaskForRootDuringMicrotask(root, now$1());
|
||||
@@ -8641,8 +8625,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$117) {
|
||||
handleThrow(root, thrownValue$117);
|
||||
} catch (thrownValue$114) {
|
||||
handleThrow(root, thrownValue$114);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -8759,8 +8743,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$119) {
|
||||
handleThrow(root, thrownValue$119);
|
||||
} catch (thrownValue$116) {
|
||||
handleThrow(root, thrownValue$116);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -10398,10 +10382,10 @@ batchedUpdatesImpl = function (fn, a) {
|
||||
}
|
||||
};
|
||||
var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1176 = {
|
||||
devToolsConfig$jscomp$inline_1173 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-bf9a1c5f",
|
||||
version: "18.3.0-canary-1af01c24",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -10431,10 +10415,10 @@ var roots = new Map(),
|
||||
} catch (err) {}
|
||||
return hook.checkDCE ? !0 : !1;
|
||||
})({
|
||||
bundleType: devToolsConfig$jscomp$inline_1176.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1176.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1176.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1176.rendererConfig,
|
||||
bundleType: devToolsConfig$jscomp$inline_1173.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1173.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1173.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1173.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -10450,14 +10434,14 @@ var roots = new Map(),
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1176.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1173.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-bf9a1c5f"
|
||||
reconcilerVersion: "18.3.0-canary-1af01c24"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
|
||||
computeComponentStackForErrorReporting: function (reactTag) {
|
||||
|
||||
Reference in New Issue
Block a user