diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 182854c609..f292cc2420 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -1528c5ccdf5c61a08adab31116156df6503e26ce +6e1756a5a9bb0d95ec17983f7dc38cd2c2663b39 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 182854c609..f292cc2420 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -1528c5ccdf5c61a08adab31116156df6503e26ce +6e1756a5a9bb0d95ec17983f7dc38cd2c2663b39 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 51db59d503..7be4ad9474 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-classic-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-classic-6e1756a5a-20230306"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 16e5ae6521..119ac08a41 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-modern-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-modern-6e1756a5a-20230306"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 72981de6f6..b29802c631 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -646,4 +646,4 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-1528c5ccd-20230306"; +exports.version = "18.3.0-www-classic-6e1756a5a-20230306"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 7f7c4a309e..9c600f03e1 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -638,4 +638,4 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-1528c5ccd-20230306"; +exports.version = "18.3.0-www-modern-6e1756a5a-20230306"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 344b54eee8..381399a68f 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -657,7 +657,7 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-1528c5ccd-20230306"; +exports.version = "18.3.0-www-classic-6e1756a5a-20230306"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index c5ccbae4ed..39c9aca095 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -649,7 +649,7 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-1528c5ccd-20230306"; +exports.version = "18.3.0-www-modern-6e1756a5a-20230306"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 9bdf3bda9d..5876a4c969 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-classic-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-classic-6e1756a5a-20230306"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -22862,7 +22862,7 @@ var SuspendedOnError = 1; var SuspendedOnData = 2; var SuspendedOnImmediate = 3; var SuspendedOnDeprecatedThrowPromise = 4; -var SuspendedAndReadyToUnwind = 5; +var SuspendedAndReadyToContinue = 5; var SuspendedOnHydration = 6; // When this is true, the work-in-progress fiber just suspended (or errored) and // we've yet to unwind the stack. In some cases, we may yield to the main thread // after this happens. If the fiber is pinged before we resume, we can retry @@ -23363,6 +23363,17 @@ function ensureRootIsScheduled(root, currentTime) { root.callbackNode = null; root.callbackPriority = NoLane; return; + } // If this root is currently suspended and waiting for data to resolve, don't + // schedule a task to render it. We'll either wait for a ping, or wait to + // receive an update. + + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + root.callbackPriority = NoLane; + root.callbackNode = null; + return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. @@ -23603,21 +23614,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. - if ( - workInProgressSuspendedReason === SuspendedOnData && - workInProgressRoot === root - ) { - // Special case: The work loop is currently suspended and waiting for - // data to resolve. Unschedule the current task. - // - // TODO: The factoring is a little weird. Arguably this should be checked - // in ensureRootIsScheduled instead. I went back and forth, not totally - // sure yet. - root.callbackPriority = NoLane; - root.callbackNode = null; - return null; - } - return performConcurrentWorkOnRoot.bind(null, root); } @@ -24199,7 +24195,7 @@ function handleThrow(root, thrownValue) { case SuspendedOnData: case SuspendedOnImmediate: case SuspendedOnDeprecatedThrowPromise: - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var wakeable = thrownValue; markComponentSuspended( erroredWork, @@ -24538,6 +24534,17 @@ function renderRootConcurrent(root, lanes) { // have added a listener until right here. var onResolution = function () { + // Check if the root is still suspended on this promise. + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + // Mark the root as ready to continue rendering. + workInProgressSuspendedReason = SuspendedAndReadyToContinue; + } // Ensure the root is scheduled. We should do this even if we're + // currently working on a different root, so that we resume + // rendering later. + ensureRootIsScheduled(root, now$1()); }; @@ -24549,11 +24556,11 @@ function renderRootConcurrent(root, lanes) { // If this fiber just suspended, it's possible the data is already // cached. Yield to the main thread to give it a chance to ping. If // it does, we can retry immediately without unwinding the stack. - workInProgressSuspendedReason = SuspendedAndReadyToUnwind; + workInProgressSuspendedReason = SuspendedAndReadyToContinue; break outer; } - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var _thenable = thrownValue; if (isThenableResolved(_thenable)) { diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 1866b2aff2..acc9180885 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-modern-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-modern-6e1756a5a-20230306"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -22522,7 +22522,7 @@ var SuspendedOnError = 1; var SuspendedOnData = 2; var SuspendedOnImmediate = 3; var SuspendedOnDeprecatedThrowPromise = 4; -var SuspendedAndReadyToUnwind = 5; +var SuspendedAndReadyToContinue = 5; var SuspendedOnHydration = 6; // When this is true, the work-in-progress fiber just suspended (or errored) and // we've yet to unwind the stack. In some cases, we may yield to the main thread // after this happens. If the fiber is pinged before we resume, we can retry @@ -23023,6 +23023,17 @@ function ensureRootIsScheduled(root, currentTime) { root.callbackNode = null; root.callbackPriority = NoLane; return; + } // If this root is currently suspended and waiting for data to resolve, don't + // schedule a task to render it. We'll either wait for a ping, or wait to + // receive an update. + + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + root.callbackPriority = NoLane; + root.callbackNode = null; + return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. @@ -23263,21 +23274,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. - if ( - workInProgressSuspendedReason === SuspendedOnData && - workInProgressRoot === root - ) { - // Special case: The work loop is currently suspended and waiting for - // data to resolve. Unschedule the current task. - // - // TODO: The factoring is a little weird. Arguably this should be checked - // in ensureRootIsScheduled instead. I went back and forth, not totally - // sure yet. - root.callbackPriority = NoLane; - root.callbackNode = null; - return null; - } - return performConcurrentWorkOnRoot.bind(null, root); } @@ -23859,7 +23855,7 @@ function handleThrow(root, thrownValue) { case SuspendedOnData: case SuspendedOnImmediate: case SuspendedOnDeprecatedThrowPromise: - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var wakeable = thrownValue; markComponentSuspended( erroredWork, @@ -24198,6 +24194,17 @@ function renderRootConcurrent(root, lanes) { // have added a listener until right here. var onResolution = function () { + // Check if the root is still suspended on this promise. + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + // Mark the root as ready to continue rendering. + workInProgressSuspendedReason = SuspendedAndReadyToContinue; + } // Ensure the root is scheduled. We should do this even if we're + // currently working on a different root, so that we resume + // rendering later. + ensureRootIsScheduled(root, now$1()); }; @@ -24209,11 +24216,11 @@ function renderRootConcurrent(root, lanes) { // If this fiber just suspended, it's possible the data is already // cached. Yield to the main thread to give it a chance to ping. If // it does, we can retry immediately without unwinding the stack. - workInProgressSuspendedReason = SuspendedAndReadyToUnwind; + workInProgressSuspendedReason = SuspendedAndReadyToContinue; break outer; } - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var _thenable = thrownValue; if (isThenableResolved(_thenable)) { diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 8949b12c99..180eaa5a62 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -7723,6 +7723,8 @@ function ensureRootIsScheduled(root, currentTime) { null !== existingCallbackNode && cancelCallback$1(existingCallbackNode), (root.callbackNode = null), (root.callbackPriority = 0); + else if (2 === workInProgressSuspendedReason && workInProgressRoot === root) + (root.callbackPriority = 0), (root.callbackNode = null); else if ( ((currentTime = suspendedLanes & -suspendedLanes), root.callbackPriority !== currentTime) @@ -7936,9 +7938,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } ensureRootIsScheduled(root, now()); return root.callbackNode === originalCallbackNode - ? 2 === workInProgressSuspendedReason && workInProgressRoot === root - ? ((root.callbackPriority = 0), (root.callbackNode = null)) - : performConcurrentWorkOnRoot.bind(null, root) + ? performConcurrentWorkOnRoot.bind(null, root) : null; } function recoverFromConcurrentError( @@ -8229,6 +8229,9 @@ function renderRootConcurrent(root, lanes) { break; } lanes = function () { + 2 === workInProgressSuspendedReason && + workInProgressRoot === root && + (workInProgressSuspendedReason = 5); ensureRootIsScheduled(root, now()); }; thrownValue.then(lanes, lanes); @@ -9780,7 +9783,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-classic-1528c5ccd-20230306", + version: "18.3.0-www-classic-6e1756a5a-20230306", rendererPackageName: "react-art" }; var internals$jscomp$inline_1300 = { @@ -9811,7 +9814,7 @@ var internals$jscomp$inline_1300 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-1528c5ccd-20230306" + reconcilerVersion: "18.3.0-next-6e1756a5a-20230306" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1301 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index cd21163716..6f06c348c5 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -7455,6 +7455,8 @@ function ensureRootIsScheduled(root, currentTime) { null !== existingCallbackNode && cancelCallback$1(existingCallbackNode), (root.callbackNode = null), (root.callbackPriority = 0); + else if (2 === workInProgressSuspendedReason && workInProgressRoot === root) + (root.callbackPriority = 0), (root.callbackNode = null); else if ( ((currentTime = suspendedLanes & -suspendedLanes), root.callbackPriority !== currentTime) @@ -7668,9 +7670,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } ensureRootIsScheduled(root, now()); return root.callbackNode === originalCallbackNode - ? 2 === workInProgressSuspendedReason && workInProgressRoot === root - ? ((root.callbackPriority = 0), (root.callbackNode = null)) - : performConcurrentWorkOnRoot.bind(null, root) + ? performConcurrentWorkOnRoot.bind(null, root) : null; } function recoverFromConcurrentError( @@ -7961,6 +7961,9 @@ function renderRootConcurrent(root, lanes) { break; } lanes = function () { + 2 === workInProgressSuspendedReason && + workInProgressRoot === root && + (workInProgressSuspendedReason = 5); ensureRootIsScheduled(root, now()); }; thrownValue.then(lanes, lanes); @@ -9445,7 +9448,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-modern-1528c5ccd-20230306", + version: "18.3.0-www-modern-6e1756a5a-20230306", rendererPackageName: "react-art" }; var internals$jscomp$inline_1280 = { @@ -9476,7 +9479,7 @@ var internals$jscomp$inline_1280 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-1528c5ccd-20230306" + reconcilerVersion: "18.3.0-next-6e1756a5a-20230306" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1281 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index eeb3982c45..0e56262889 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -37317,7 +37317,7 @@ var SuspendedOnError = 1; var SuspendedOnData = 2; var SuspendedOnImmediate = 3; var SuspendedOnDeprecatedThrowPromise = 4; -var SuspendedAndReadyToUnwind = 5; +var SuspendedAndReadyToContinue = 5; var SuspendedOnHydration = 6; // When this is true, the work-in-progress fiber just suspended (or errored) and // we've yet to unwind the stack. In some cases, we may yield to the main thread // after this happens. If the fiber is pinged before we resume, we can retry @@ -37833,6 +37833,17 @@ function ensureRootIsScheduled(root, currentTime) { root.callbackNode = null; root.callbackPriority = NoLane; return; + } // If this root is currently suspended and waiting for data to resolve, don't + // schedule a task to render it. We'll either wait for a ping, or wait to + // receive an update. + + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + root.callbackPriority = NoLane; + root.callbackNode = null; + return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. @@ -38093,21 +38104,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. - if ( - workInProgressSuspendedReason === SuspendedOnData && - workInProgressRoot === root - ) { - // Special case: The work loop is currently suspended and waiting for - // data to resolve. Unschedule the current task. - // - // TODO: The factoring is a little weird. Arguably this should be checked - // in ensureRootIsScheduled instead. I went back and forth, not totally - // sure yet. - root.callbackPriority = NoLane; - root.callbackNode = null; - return null; - } - return performConcurrentWorkOnRoot.bind(null, root); } @@ -38764,7 +38760,7 @@ function handleThrow(root, thrownValue) { case SuspendedOnData: case SuspendedOnImmediate: case SuspendedOnDeprecatedThrowPromise: - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var wakeable = thrownValue; markComponentSuspended( erroredWork, @@ -39105,6 +39101,17 @@ function renderRootConcurrent(root, lanes) { // have added a listener until right here. var onResolution = function () { + // Check if the root is still suspended on this promise. + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + // Mark the root as ready to continue rendering. + workInProgressSuspendedReason = SuspendedAndReadyToContinue; + } // Ensure the root is scheduled. We should do this even if we're + // currently working on a different root, so that we resume + // rendering later. + ensureRootIsScheduled(root, now$1()); }; @@ -39116,11 +39123,11 @@ function renderRootConcurrent(root, lanes) { // If this fiber just suspended, it's possible the data is already // cached. Yield to the main thread to give it a chance to ping. If // it does, we can retry immediately without unwinding the stack. - workInProgressSuspendedReason = SuspendedAndReadyToUnwind; + workInProgressSuspendedReason = SuspendedAndReadyToContinue; break outer; } - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var _thenable = thrownValue; if (isThenableResolved(_thenable)) { @@ -42117,7 +42124,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-classic-6e1756a5a-20230306"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index af2771a896..1539481248 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -36921,7 +36921,7 @@ var SuspendedOnError = 1; var SuspendedOnData = 2; var SuspendedOnImmediate = 3; var SuspendedOnDeprecatedThrowPromise = 4; -var SuspendedAndReadyToUnwind = 5; +var SuspendedAndReadyToContinue = 5; var SuspendedOnHydration = 6; // When this is true, the work-in-progress fiber just suspended (or errored) and // we've yet to unwind the stack. In some cases, we may yield to the main thread // after this happens. If the fiber is pinged before we resume, we can retry @@ -37437,6 +37437,17 @@ function ensureRootIsScheduled(root, currentTime) { root.callbackNode = null; root.callbackPriority = NoLane; return; + } // If this root is currently suspended and waiting for data to resolve, don't + // schedule a task to render it. We'll either wait for a ping, or wait to + // receive an update. + + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + root.callbackPriority = NoLane; + root.callbackNode = null; + return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. @@ -37697,21 +37708,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. - if ( - workInProgressSuspendedReason === SuspendedOnData && - workInProgressRoot === root - ) { - // Special case: The work loop is currently suspended and waiting for - // data to resolve. Unschedule the current task. - // - // TODO: The factoring is a little weird. Arguably this should be checked - // in ensureRootIsScheduled instead. I went back and forth, not totally - // sure yet. - root.callbackPriority = NoLane; - root.callbackNode = null; - return null; - } - return performConcurrentWorkOnRoot.bind(null, root); } @@ -38368,7 +38364,7 @@ function handleThrow(root, thrownValue) { case SuspendedOnData: case SuspendedOnImmediate: case SuspendedOnDeprecatedThrowPromise: - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var wakeable = thrownValue; markComponentSuspended( erroredWork, @@ -38709,6 +38705,17 @@ function renderRootConcurrent(root, lanes) { // have added a listener until right here. var onResolution = function () { + // Check if the root is still suspended on this promise. + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + // Mark the root as ready to continue rendering. + workInProgressSuspendedReason = SuspendedAndReadyToContinue; + } // Ensure the root is scheduled. We should do this even if we're + // currently working on a different root, so that we resume + // rendering later. + ensureRootIsScheduled(root, now$1()); }; @@ -38720,11 +38727,11 @@ function renderRootConcurrent(root, lanes) { // If this fiber just suspended, it's possible the data is already // cached. Yield to the main thread to give it a chance to ping. If // it does, we can retry immediately without unwinding the stack. - workInProgressSuspendedReason = SuspendedAndReadyToUnwind; + workInProgressSuspendedReason = SuspendedAndReadyToContinue; break outer; } - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var _thenable = thrownValue; if (isThenableResolved(_thenable)) { @@ -41721,7 +41728,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-modern-6e1756a5a-20230306"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index e0143ef56c..9cfa4f1e22 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -12961,6 +12961,8 @@ function ensureRootIsScheduled(root, currentTime) { null !== existingCallbackNode && cancelCallback$1(existingCallbackNode), (root.callbackNode = null), (root.callbackPriority = 0); + else if (2 === workInProgressSuspendedReason && workInProgressRoot === root) + (root.callbackPriority = 0), (root.callbackNode = null); else if ( ((currentTime = nextLanes & -nextLanes), root.callbackPriority !== currentTime) @@ -13169,9 +13171,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } ensureRootIsScheduled(root, now()); return root.callbackNode === originalCallbackNode - ? 2 === workInProgressSuspendedReason && workInProgressRoot === root - ? ((root.callbackPriority = 0), (root.callbackNode = null)) - : performConcurrentWorkOnRoot.bind(null, root) + ? performConcurrentWorkOnRoot.bind(null, root) : null; } function recoverFromConcurrentError( @@ -13502,6 +13502,9 @@ function renderRootConcurrent(root, lanes) { break; } lanes = function () { + 2 === workInProgressSuspendedReason && + workInProgressRoot === root && + (workInProgressSuspendedReason = 5); ensureRootIsScheduled(root, now()); }; thrownValue.then(lanes, lanes); @@ -15490,7 +15493,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1741 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-1528c5ccd-20230306", + version: "18.3.0-www-classic-6e1756a5a-20230306", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2108 = { @@ -15520,7 +15523,7 @@ var internals$jscomp$inline_2108 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-1528c5ccd-20230306" + reconcilerVersion: "18.3.0-next-6e1756a5a-20230306" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2109 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15776,4 +15779,4 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-1528c5ccd-20230306"; +exports.version = "18.3.0-next-6e1756a5a-20230306"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index d0b4c3c2f0..4fff535fe4 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -12706,6 +12706,8 @@ function ensureRootIsScheduled(root, currentTime) { null !== existingCallbackNode && cancelCallback$1(existingCallbackNode), (root.callbackNode = null), (root.callbackPriority = 0); + else if (2 === workInProgressSuspendedReason && workInProgressRoot === root) + (root.callbackPriority = 0), (root.callbackNode = null); else if ( ((currentTime = nextLanes & -nextLanes), root.callbackPriority !== currentTime) @@ -12914,9 +12916,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } ensureRootIsScheduled(root, now()); return root.callbackNode === originalCallbackNode - ? 2 === workInProgressSuspendedReason && workInProgressRoot === root - ? ((root.callbackPriority = 0), (root.callbackNode = null)) - : performConcurrentWorkOnRoot.bind(null, root) + ? performConcurrentWorkOnRoot.bind(null, root) : null; } function recoverFromConcurrentError( @@ -13247,6 +13247,9 @@ function renderRootConcurrent(root, lanes) { break; } lanes = function () { + 2 === workInProgressSuspendedReason && + workInProgressRoot === root && + (workInProgressSuspendedReason = 5); ensureRootIsScheduled(root, now()); }; thrownValue.then(lanes, lanes); @@ -15019,7 +15022,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1700 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-1528c5ccd-20230306", + version: "18.3.0-www-modern-6e1756a5a-20230306", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2072 = { @@ -15050,7 +15053,7 @@ var internals$jscomp$inline_2072 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-1528c5ccd-20230306" + reconcilerVersion: "18.3.0-next-6e1756a5a-20230306" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2073 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15235,4 +15238,4 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-1528c5ccd-20230306"; +exports.version = "18.3.0-next-6e1756a5a-20230306"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index c18f40d003..f8e56c1673 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -13568,6 +13568,8 @@ function ensureRootIsScheduled(root, currentTime) { null !== existingCallbackNode && cancelCallback$1(existingCallbackNode), (root.callbackNode = null), (root.callbackPriority = 0); + else if (2 === workInProgressSuspendedReason && workInProgressRoot === root) + (root.callbackPriority = 0), (root.callbackNode = null); else if ( ((currentTime = nextLanes & -nextLanes), root.callbackPriority !== currentTime) @@ -13777,9 +13779,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } ensureRootIsScheduled(root, now$1()); return root.callbackNode === originalCallbackNode - ? 2 === workInProgressSuspendedReason && workInProgressRoot === root - ? ((root.callbackPriority = 0), (root.callbackNode = null)) - : performConcurrentWorkOnRoot.bind(null, root) + ? performConcurrentWorkOnRoot.bind(null, root) : null; } function recoverFromConcurrentError( @@ -14162,6 +14162,9 @@ function renderRootConcurrent(root, lanes) { break; } lanes = function () { + 2 === workInProgressSuspendedReason && + workInProgressRoot === root && + (workInProgressSuspendedReason = 5); ensureRootIsScheduled(root, now$1()); }; memoizedUpdaters.then(lanes, lanes); @@ -16267,7 +16270,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1821 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-1528c5ccd-20230306", + version: "18.3.0-www-classic-6e1756a5a-20230306", rendererPackageName: "react-dom" }; (function (internals) { @@ -16311,7 +16314,7 @@ var devToolsConfig$jscomp$inline_1821 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-1528c5ccd-20230306" + reconcilerVersion: "18.3.0-next-6e1756a5a-20230306" }); assign(Internals, { ReactBrowserEventEmitter: { @@ -16554,7 +16557,7 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-1528c5ccd-20230306"; +exports.version = "18.3.0-next-6e1756a5a-20230306"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 2072d0b739..8722b2dd25 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -13303,6 +13303,8 @@ function ensureRootIsScheduled(root, currentTime) { null !== existingCallbackNode && cancelCallback$1(existingCallbackNode), (root.callbackNode = null), (root.callbackPriority = 0); + else if (2 === workInProgressSuspendedReason && workInProgressRoot === root) + (root.callbackPriority = 0), (root.callbackNode = null); else if ( ((currentTime = nextLanes & -nextLanes), root.callbackPriority !== currentTime) @@ -13512,9 +13514,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } ensureRootIsScheduled(root, now$1()); return root.callbackNode === originalCallbackNode - ? 2 === workInProgressSuspendedReason && workInProgressRoot === root - ? ((root.callbackPriority = 0), (root.callbackNode = null)) - : performConcurrentWorkOnRoot.bind(null, root) + ? performConcurrentWorkOnRoot.bind(null, root) : null; } function recoverFromConcurrentError( @@ -13897,6 +13897,9 @@ function renderRootConcurrent(root, lanes) { break; } lanes = function () { + 2 === workInProgressSuspendedReason && + workInProgressRoot === root && + (workInProgressSuspendedReason = 5); ensureRootIsScheduled(root, now$1()); }; memoizedUpdaters.then(lanes, lanes); @@ -15786,7 +15789,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1780 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-1528c5ccd-20230306", + version: "18.3.0-www-modern-6e1756a5a-20230306", rendererPackageName: "react-dom" }; (function (internals) { @@ -15831,7 +15834,7 @@ var devToolsConfig$jscomp$inline_1780 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-1528c5ccd-20230306" + reconcilerVersion: "18.3.0-next-6e1756a5a-20230306" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = function (children, container) { @@ -16003,7 +16006,7 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-1528c5ccd-20230306"; +exports.version = "18.3.0-next-6e1756a5a-20230306"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index bbf73a6219..3620e6e780 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-classic-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-classic-6e1756a5a-20230306"; // This refers to a WWW module. var warningWWW = require("warning"); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index afecd44a4c..2f3c033b6f 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-modern-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-modern-6e1756a5a-20230306"; // This refers to a WWW module. var warningWWW = require("warning"); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 93156f69be..ffb858288e 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -3771,4 +3771,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "18.3.0-www-classic-1528c5ccd-20230306"; +exports.version = "18.3.0-www-classic-6e1756a5a-20230306"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 008ef0f48b..8e87fa5d38 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -3669,4 +3669,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "18.3.0-www-modern-1528c5ccd-20230306"; +exports.version = "18.3.0-www-modern-6e1756a5a-20230306"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index bbc8345817..ff9cce6760 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -27279,7 +27279,7 @@ var SuspendedOnError = 1; var SuspendedOnData = 2; var SuspendedOnImmediate = 3; var SuspendedOnDeprecatedThrowPromise = 4; -var SuspendedAndReadyToUnwind = 5; +var SuspendedAndReadyToContinue = 5; var SuspendedOnHydration = 6; // When this is true, the work-in-progress fiber just suspended (or errored) and // we've yet to unwind the stack. In some cases, we may yield to the main thread // after this happens. If the fiber is pinged before we resume, we can retry @@ -27591,6 +27591,17 @@ function ensureRootIsScheduled(root, currentTime) { root.callbackNode = null; root.callbackPriority = NoLane; return; + } // If this root is currently suspended and waiting for data to resolve, don't + // schedule a task to render it. We'll either wait for a ping, or wait to + // receive an update. + + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + root.callbackPriority = NoLane; + root.callbackNode = null; + return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. @@ -27848,21 +27859,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. - if ( - workInProgressSuspendedReason === SuspendedOnData && - workInProgressRoot === root - ) { - // Special case: The work loop is currently suspended and waiting for - // data to resolve. Unschedule the current task. - // - // TODO: The factoring is a little weird. Arguably this should be checked - // in ensureRootIsScheduled instead. I went back and forth, not totally - // sure yet. - root.callbackPriority = NoLane; - root.callbackNode = null; - return null; - } - return performConcurrentWorkOnRoot.bind(null, root); } @@ -28752,6 +28748,17 @@ function renderRootConcurrent(root, lanes) { // have added a listener until right here. var onResolution = function () { + // Check if the root is still suspended on this promise. + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + // Mark the root as ready to continue rendering. + workInProgressSuspendedReason = SuspendedAndReadyToContinue; + } // Ensure the root is scheduled. We should do this even if we're + // currently working on a different root, so that we resume + // rendering later. + ensureRootIsScheduled(root, now()); }; @@ -28763,11 +28770,11 @@ function renderRootConcurrent(root, lanes) { // If this fiber just suspended, it's possible the data is already // cached. Yield to the main thread to give it a chance to ping. If // it does, we can retry immediately without unwinding the stack. - workInProgressSuspendedReason = SuspendedAndReadyToUnwind; + workInProgressSuspendedReason = SuspendedAndReadyToContinue; break outer; } - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var _thenable = thrownValue; if (isThenableResolved(_thenable)) { @@ -31246,7 +31253,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-classic-6e1756a5a-20230306"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 06b8afc5b9..e6da0823bd 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -33770,7 +33770,7 @@ var SuspendedOnError = 1; var SuspendedOnData = 2; var SuspendedOnImmediate = 3; var SuspendedOnDeprecatedThrowPromise = 4; -var SuspendedAndReadyToUnwind = 5; +var SuspendedAndReadyToContinue = 5; var SuspendedOnHydration = 6; // When this is true, the work-in-progress fiber just suspended (or errored) and // we've yet to unwind the stack. In some cases, we may yield to the main thread // after this happens. If the fiber is pinged before we resume, we can retry @@ -34082,6 +34082,17 @@ function ensureRootIsScheduled(root, currentTime) { root.callbackNode = null; root.callbackPriority = NoLane; return; + } // If this root is currently suspended and waiting for data to resolve, don't + // schedule a task to render it. We'll either wait for a ping, or wait to + // receive an update. + + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + root.callbackPriority = NoLane; + root.callbackNode = null; + return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. @@ -34339,21 +34350,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. - if ( - workInProgressSuspendedReason === SuspendedOnData && - workInProgressRoot === root - ) { - // Special case: The work loop is currently suspended and waiting for - // data to resolve. Unschedule the current task. - // - // TODO: The factoring is a little weird. Arguably this should be checked - // in ensureRootIsScheduled instead. I went back and forth, not totally - // sure yet. - root.callbackPriority = NoLane; - root.callbackNode = null; - return null; - } - return performConcurrentWorkOnRoot.bind(null, root); } @@ -35243,6 +35239,17 @@ function renderRootConcurrent(root, lanes) { // have added a listener until right here. var onResolution = function () { + // Check if the root is still suspended on this promise. + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + // Mark the root as ready to continue rendering. + workInProgressSuspendedReason = SuspendedAndReadyToContinue; + } // Ensure the root is scheduled. We should do this even if we're + // currently working on a different root, so that we resume + // rendering later. + ensureRootIsScheduled(root, now()); }; @@ -35254,11 +35261,11 @@ function renderRootConcurrent(root, lanes) { // If this fiber just suspended, it's possible the data is already // cached. Yield to the main thread to give it a chance to ping. If // it does, we can retry immediately without unwinding the stack. - workInProgressSuspendedReason = SuspendedAndReadyToUnwind; + workInProgressSuspendedReason = SuspendedAndReadyToContinue; break outer; } - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var _thenable = thrownValue; if (isThenableResolved(_thenable)) { @@ -37737,7 +37744,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-modern-6e1756a5a-20230306"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index fdcb8128a8..2623cda127 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -9089,6 +9089,8 @@ function ensureRootIsScheduled(root, currentTime) { null !== existingCallbackNode && cancelCallback$1(existingCallbackNode), (root.callbackNode = null), (root.callbackPriority = 0); + else if (2 === workInProgressSuspendedReason && workInProgressRoot === root) + (root.callbackPriority = 0), (root.callbackNode = null); else if ( ((currentTime = nextLanes & -nextLanes), root.callbackPriority !== currentTime) @@ -9297,9 +9299,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } ensureRootIsScheduled(root, now()); return root.callbackNode === originalCallbackNode - ? 2 === workInProgressSuspendedReason && workInProgressRoot === root - ? ((root.callbackPriority = 0), (root.callbackNode = null)) - : performConcurrentWorkOnRoot.bind(null, root) + ? performConcurrentWorkOnRoot.bind(null, root) : null; } function recoverFromConcurrentError( @@ -9629,6 +9629,9 @@ function renderRootConcurrent(root, lanes) { break; } lanes = function () { + 2 === workInProgressSuspendedReason && + workInProgressRoot === root && + (workInProgressSuspendedReason = 5); ensureRootIsScheduled(root, now()); }; thrownValue.then(lanes, lanes); @@ -11521,7 +11524,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1535 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-1528c5ccd-20230306", + version: "18.3.0-www-classic-6e1756a5a-20230306", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2058 = { @@ -11551,7 +11554,7 @@ var internals$jscomp$inline_2058 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-1528c5ccd-20230306" + reconcilerVersion: "18.3.0-next-6e1756a5a-20230306" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2059 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -14782,4 +14785,4 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-1528c5ccd-20230306"; +exports.version = "18.3.0-next-6e1756a5a-20230306"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 547100319f..75dd6762c2 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -11710,6 +11710,8 @@ function ensureRootIsScheduled(root, currentTime) { null !== existingCallbackNode && cancelCallback$1(existingCallbackNode), (root.callbackNode = null), (root.callbackPriority = 0); + else if (2 === workInProgressSuspendedReason && workInProgressRoot === root) + (root.callbackPriority = 0), (root.callbackNode = null); else if ( ((currentTime = nextLanes & -nextLanes), root.callbackPriority !== currentTime) @@ -11918,9 +11920,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } ensureRootIsScheduled(root, now()); return root.callbackNode === originalCallbackNode - ? 2 === workInProgressSuspendedReason && workInProgressRoot === root - ? ((root.callbackPriority = 0), (root.callbackNode = null)) - : performConcurrentWorkOnRoot.bind(null, root) + ? performConcurrentWorkOnRoot.bind(null, root) : null; } function recoverFromConcurrentError( @@ -12250,6 +12250,9 @@ function renderRootConcurrent(root, lanes) { break; } lanes = function () { + 2 === workInProgressSuspendedReason && + workInProgressRoot === root && + (workInProgressSuspendedReason = 5); ensureRootIsScheduled(root, now()); }; thrownValue.then(lanes, lanes); @@ -13881,7 +13884,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1652 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-1528c5ccd-20230306", + version: "18.3.0-www-modern-6e1756a5a-20230306", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2032 = { @@ -13912,7 +13915,7 @@ var internals$jscomp$inline_2032 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-1528c5ccd-20230306" + reconcilerVersion: "18.3.0-next-6e1756a5a-20230306" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2033 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -14240,4 +14243,4 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-1528c5ccd-20230306"; +exports.version = "18.3.0-next-6e1756a5a-20230306"; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index e0976f6ebf..3982bb6a5c 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -19757,7 +19757,7 @@ var SuspendedOnError = 1; var SuspendedOnData = 2; var SuspendedOnImmediate = 3; var SuspendedOnDeprecatedThrowPromise = 4; -var SuspendedAndReadyToUnwind = 5; +var SuspendedAndReadyToContinue = 5; var SuspendedOnHydration = 6; // When this is true, the work-in-progress fiber just suspended (or errored) and // we've yet to unwind the stack. In some cases, we may yield to the main thread // after this happens. If the fiber is pinged before we resume, we can retry @@ -20055,6 +20055,17 @@ function ensureRootIsScheduled(root, currentTime) { root.callbackNode = null; root.callbackPriority = NoLane; return; + } // If this root is currently suspended and waiting for data to resolve, don't + // schedule a task to render it. We'll either wait for a ping, or wait to + // receive an update. + + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + root.callbackPriority = NoLane; + root.callbackNode = null; + return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. @@ -20295,21 +20306,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. - if ( - workInProgressSuspendedReason === SuspendedOnData && - workInProgressRoot === root - ) { - // Special case: The work loop is currently suspended and waiting for - // data to resolve. Unschedule the current task. - // - // TODO: The factoring is a little weird. Arguably this should be checked - // in ensureRootIsScheduled instead. I went back and forth, not totally - // sure yet. - root.callbackPriority = NoLane; - root.callbackNode = null; - return null; - } - return performConcurrentWorkOnRoot.bind(null, root); } @@ -21155,6 +21151,17 @@ function renderRootConcurrent(root, lanes) { // have added a listener until right here. var onResolution = function () { + // Check if the root is still suspended on this promise. + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + // Mark the root as ready to continue rendering. + workInProgressSuspendedReason = SuspendedAndReadyToContinue; + } // Ensure the root is scheduled. We should do this even if we're + // currently working on a different root, so that we resume + // rendering later. + ensureRootIsScheduled(root, now$1()); }; @@ -21166,11 +21173,11 @@ function renderRootConcurrent(root, lanes) { // If this fiber just suspended, it's possible the data is already // cached. Yield to the main thread to give it a chance to ping. If // it does, we can retry immediately without unwinding the stack. - workInProgressSuspendedReason = SuspendedAndReadyToUnwind; + workInProgressSuspendedReason = SuspendedAndReadyToContinue; break outer; } - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var _thenable = thrownValue; if (isThenableResolved(_thenable)) { @@ -23762,7 +23769,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-classic-6e1756a5a-20230306"; // Might add PROFILE later. diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 3551c30d33..b2e96b4c5e 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -19757,7 +19757,7 @@ var SuspendedOnError = 1; var SuspendedOnData = 2; var SuspendedOnImmediate = 3; var SuspendedOnDeprecatedThrowPromise = 4; -var SuspendedAndReadyToUnwind = 5; +var SuspendedAndReadyToContinue = 5; var SuspendedOnHydration = 6; // When this is true, the work-in-progress fiber just suspended (or errored) and // we've yet to unwind the stack. In some cases, we may yield to the main thread // after this happens. If the fiber is pinged before we resume, we can retry @@ -20055,6 +20055,17 @@ function ensureRootIsScheduled(root, currentTime) { root.callbackNode = null; root.callbackPriority = NoLane; return; + } // If this root is currently suspended and waiting for data to resolve, don't + // schedule a task to render it. We'll either wait for a ping, or wait to + // receive an update. + + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + root.callbackPriority = NoLane; + root.callbackNode = null; + return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. @@ -20295,21 +20306,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. - if ( - workInProgressSuspendedReason === SuspendedOnData && - workInProgressRoot === root - ) { - // Special case: The work loop is currently suspended and waiting for - // data to resolve. Unschedule the current task. - // - // TODO: The factoring is a little weird. Arguably this should be checked - // in ensureRootIsScheduled instead. I went back and forth, not totally - // sure yet. - root.callbackPriority = NoLane; - root.callbackNode = null; - return null; - } - return performConcurrentWorkOnRoot.bind(null, root); } @@ -21155,6 +21151,17 @@ function renderRootConcurrent(root, lanes) { // have added a listener until right here. var onResolution = function () { + // Check if the root is still suspended on this promise. + if ( + workInProgressSuspendedReason === SuspendedOnData && + workInProgressRoot === root + ) { + // Mark the root as ready to continue rendering. + workInProgressSuspendedReason = SuspendedAndReadyToContinue; + } // Ensure the root is scheduled. We should do this even if we're + // currently working on a different root, so that we resume + // rendering later. + ensureRootIsScheduled(root, now$1()); }; @@ -21166,11 +21173,11 @@ function renderRootConcurrent(root, lanes) { // If this fiber just suspended, it's possible the data is already // cached. Yield to the main thread to give it a chance to ping. If // it does, we can retry immediately without unwinding the stack. - workInProgressSuspendedReason = SuspendedAndReadyToUnwind; + workInProgressSuspendedReason = SuspendedAndReadyToContinue; break outer; } - case SuspendedAndReadyToUnwind: { + case SuspendedAndReadyToContinue: { var _thenable = thrownValue; if (isThenableResolved(_thenable)) { @@ -23762,7 +23769,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-1528c5ccd-20230306"; +var ReactVersion = "18.3.0-www-modern-6e1756a5a-20230306"; // Might add PROFILE later.