Skip to content

Commit d05978b

Browse files
committed
Revert "Revert "Allow transitions to interrupt Suspensey commits (#26531)""
This reverts commit cfd9d8c. DiffTrain build for [f923179](f923179)
1 parent 4771ede commit d05978b

18 files changed

+168
-120
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d08b6cf47b8b4c5bcf8e393fe7b42a896be1b44c
1+
f9231793c57da481cc2030b77f9806cd4dc156f0

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-modern-bb5f7a26";
30+
var ReactVersion = "18.3.0-www-modern-8b241311";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-classic-1b01c793";
72+
var ReactVersion = "18.3.0-www-classic-a86bcc37";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;
@@ -23345,12 +23345,14 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
2334523345
var existingCallbackNode = root.callbackNode;
2334623346

2334723347
if (
23348+
// Check if there's nothing to work on
2334823349
nextLanes === NoLanes || // If this root is currently suspended and waiting for data to resolve, don't
2334923350
// schedule a task to render it. We'll either wait for a ping, or wait to
2335023351
// receive an update.
23351-
(isWorkLoopSuspendedOnData() && root === workInProgressRoot) || // We should only interrupt a pending commit if the new update
23352-
// is urgent.
23353-
(root.cancelPendingCommit !== null && includesOnlyNonUrgentLanes(nextLanes))
23352+
//
23353+
// Suspended render phase
23354+
(root === workInProgressRoot && isWorkLoopSuspendedOnData()) || // Suspended commit phase
23355+
root.cancelPendingCommit !== null
2335423356
) {
2335523357
// Fast path: There's nothing to work on.
2335623358
if (existingCallbackNode !== null) {
@@ -23880,8 +23882,10 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
2388023882
// finish loading.
2388123883

2388223884
if (
23883-
workInProgressSuspendedReason === SuspendedOnData &&
23884-
root === workInProgressRoot
23885+
// Suspended render phase
23886+
(root === workInProgressRoot &&
23887+
workInProgressSuspendedReason === SuspendedOnData) || // Suspended commit phase
23888+
root.cancelPendingCommit !== null
2388523889
) {
2388623890
// The incoming update might unblock the current render. Interrupt the
2388723891
// current attempt and restart from the top.

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-modern-2e85e78c";
72+
var ReactVersion = "18.3.0-www-modern-9c618c06";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;
@@ -23005,12 +23005,14 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
2300523005
var existingCallbackNode = root.callbackNode;
2300623006

2300723007
if (
23008+
// Check if there's nothing to work on
2300823009
nextLanes === NoLanes || // If this root is currently suspended and waiting for data to resolve, don't
2300923010
// schedule a task to render it. We'll either wait for a ping, or wait to
2301023011
// receive an update.
23011-
(isWorkLoopSuspendedOnData() && root === workInProgressRoot) || // We should only interrupt a pending commit if the new update
23012-
// is urgent.
23013-
(root.cancelPendingCommit !== null && includesOnlyNonUrgentLanes(nextLanes))
23012+
//
23013+
// Suspended render phase
23014+
(root === workInProgressRoot && isWorkLoopSuspendedOnData()) || // Suspended commit phase
23015+
root.cancelPendingCommit !== null
2301423016
) {
2301523017
// Fast path: There's nothing to work on.
2301623018
if (existingCallbackNode !== null) {
@@ -23540,8 +23542,10 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
2354023542
// finish loading.
2354123543

2354223544
if (
23543-
workInProgressSuspendedReason === SuspendedOnData &&
23544-
root === workInProgressRoot
23545+
// Suspended render phase
23546+
(root === workInProgressRoot &&
23547+
workInProgressSuspendedReason === SuspendedOnData) || // Suspended commit phase
23548+
root.cancelPendingCommit !== null
2354523549
) {
2354623550
// The incoming update might unblock the current render. Interrupt the
2354723551
// current attempt and restart from the top.

compiled/facebook-www/ReactART-prod.classic.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7811,8 +7811,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
78117811
pingedLanes = root.callbackNode;
78127812
if (
78137813
0 === suspendedLanes ||
7814-
(2 === workInProgressSuspendedReason && root === currentTime) ||
7815-
(null !== root.cancelPendingCommit && 0 === (suspendedLanes & 42))
7814+
(root === currentTime && 2 === workInProgressSuspendedReason) ||
7815+
null !== root.cancelPendingCommit
78167816
)
78177817
return (
78187818
null !== pingedLanes &&
@@ -7975,10 +7975,12 @@ function requestUpdateLane(fiber) {
79757975
return 0 !== fiber ? fiber : 32;
79767976
}
79777977
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
7978-
2 === workInProgressSuspendedReason &&
7979-
root === workInProgressRoot &&
7980-
(prepareFreshStack(root, 0),
7981-
markRootSuspended(root, workInProgressRootRenderLanes));
7978+
if (
7979+
(root === workInProgressRoot && 2 === workInProgressSuspendedReason) ||
7980+
null !== root.cancelPendingCommit
7981+
)
7982+
prepareFreshStack(root, 0),
7983+
markRootSuspended(root, workInProgressRootRenderLanes);
79827984
markRootUpdated(root, lane, eventTime);
79837985
if (0 === (executionContext & 2) || root !== workInProgressRoot) {
79847986
if (
@@ -10056,7 +10058,7 @@ var slice = Array.prototype.slice,
1005610058
return null;
1005710059
},
1005810060
bundleType: 0,
10059-
version: "18.3.0-www-classic-01a75bbd",
10061+
version: "18.3.0-www-classic-d70758c5",
1006010062
rendererPackageName: "react-art"
1006110063
};
1006210064
var internals$jscomp$inline_1342 = {
@@ -10087,7 +10089,7 @@ var internals$jscomp$inline_1342 = {
1008710089
scheduleRoot: null,
1008810090
setRefreshHandler: null,
1008910091
getCurrentFiber: null,
10090-
reconcilerVersion: "18.3.0-www-classic-01a75bbd"
10092+
reconcilerVersion: "18.3.0-www-classic-d70758c5"
1009110093
};
1009210094
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1009310095
var hook$jscomp$inline_1343 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled/facebook-www/ReactART-prod.modern.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7543,8 +7543,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
75437543
pingedLanes = root.callbackNode;
75447544
if (
75457545
0 === suspendedLanes ||
7546-
(2 === workInProgressSuspendedReason && root === currentTime) ||
7547-
(null !== root.cancelPendingCommit && 0 === (suspendedLanes & 42))
7546+
(root === currentTime && 2 === workInProgressSuspendedReason) ||
7547+
null !== root.cancelPendingCommit
75487548
)
75497549
return (
75507550
null !== pingedLanes &&
@@ -7707,10 +7707,12 @@ function requestUpdateLane(fiber) {
77077707
return 0 !== fiber ? fiber : 32;
77087708
}
77097709
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
7710-
2 === workInProgressSuspendedReason &&
7711-
root === workInProgressRoot &&
7712-
(prepareFreshStack(root, 0),
7713-
markRootSuspended(root, workInProgressRootRenderLanes));
7710+
if (
7711+
(root === workInProgressRoot && 2 === workInProgressSuspendedReason) ||
7712+
null !== root.cancelPendingCommit
7713+
)
7714+
prepareFreshStack(root, 0),
7715+
markRootSuspended(root, workInProgressRootRenderLanes);
77147716
markRootUpdated(root, lane, eventTime);
77157717
if (0 === (executionContext & 2) || root !== workInProgressRoot) {
77167718
if (
@@ -9721,7 +9723,7 @@ var slice = Array.prototype.slice,
97219723
return null;
97229724
},
97239725
bundleType: 0,
9724-
version: "18.3.0-www-modern-91db4189",
9726+
version: "18.3.0-www-modern-feebe80d",
97259727
rendererPackageName: "react-art"
97269728
};
97279729
var internals$jscomp$inline_1322 = {
@@ -9752,7 +9754,7 @@ var internals$jscomp$inline_1322 = {
97529754
scheduleRoot: null,
97539755
setRefreshHandler: null,
97549756
getCurrentFiber: null,
9755-
reconcilerVersion: "18.3.0-www-modern-91db4189"
9757+
reconcilerVersion: "18.3.0-www-modern-feebe80d"
97569758
};
97579759
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
97589760
var hook$jscomp$inline_1323 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled/facebook-www/ReactDOM-dev.classic.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28858,12 +28858,14 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
2885828858
var existingCallbackNode = root.callbackNode;
2885928859

2886028860
if (
28861+
// Check if there's nothing to work on
2886128862
nextLanes === NoLanes || // If this root is currently suspended and waiting for data to resolve, don't
2886228863
// schedule a task to render it. We'll either wait for a ping, or wait to
2886328864
// receive an update.
28864-
(isWorkLoopSuspendedOnData() && root === workInProgressRoot) || // We should only interrupt a pending commit if the new update
28865-
// is urgent.
28866-
(root.cancelPendingCommit !== null && includesOnlyNonUrgentLanes(nextLanes))
28865+
//
28866+
// Suspended render phase
28867+
(root === workInProgressRoot && isWorkLoopSuspendedOnData()) || // Suspended commit phase
28868+
root.cancelPendingCommit !== null
2886728869
) {
2886828870
// Fast path: There's nothing to work on.
2886928871
if (existingCallbackNode !== null) {
@@ -29411,8 +29413,10 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
2941129413
// finish loading.
2941229414

2941329415
if (
29414-
workInProgressSuspendedReason === SuspendedOnData &&
29415-
root === workInProgressRoot
29416+
// Suspended render phase
29417+
(root === workInProgressRoot &&
29418+
workInProgressSuspendedReason === SuspendedOnData) || // Suspended commit phase
29419+
root.cancelPendingCommit !== null
2941629420
) {
2941729421
// The incoming update might unblock the current render. Interrupt the
2941829422
// current attempt and restart from the top.
@@ -33879,7 +33883,7 @@ function createFiberRoot(
3387933883
return root;
3388033884
}
3388133885

33882-
var ReactVersion = "18.3.0-www-classic-9ad44702";
33886+
var ReactVersion = "18.3.0-www-classic-000b299c";
3388333887

3388433888
function createPortal$1(
3388533889
children,

compiled/facebook-www/ReactDOM-dev.modern.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28697,12 +28697,14 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
2869728697
var existingCallbackNode = root.callbackNode;
2869828698

2869928699
if (
28700+
// Check if there's nothing to work on
2870028701
nextLanes === NoLanes || // If this root is currently suspended and waiting for data to resolve, don't
2870128702
// schedule a task to render it. We'll either wait for a ping, or wait to
2870228703
// receive an update.
28703-
(isWorkLoopSuspendedOnData() && root === workInProgressRoot) || // We should only interrupt a pending commit if the new update
28704-
// is urgent.
28705-
(root.cancelPendingCommit !== null && includesOnlyNonUrgentLanes(nextLanes))
28704+
//
28705+
// Suspended render phase
28706+
(root === workInProgressRoot && isWorkLoopSuspendedOnData()) || // Suspended commit phase
28707+
root.cancelPendingCommit !== null
2870628708
) {
2870728709
// Fast path: There's nothing to work on.
2870828710
if (existingCallbackNode !== null) {
@@ -29250,8 +29252,10 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
2925029252
// finish loading.
2925129253

2925229254
if (
29253-
workInProgressSuspendedReason === SuspendedOnData &&
29254-
root === workInProgressRoot
29255+
// Suspended render phase
29256+
(root === workInProgressRoot &&
29257+
workInProgressSuspendedReason === SuspendedOnData) || // Suspended commit phase
29258+
root.cancelPendingCommit !== null
2925529259
) {
2925629260
// The incoming update might unblock the current render. Interrupt the
2925729261
// current attempt and restart from the top.
@@ -33718,7 +33722,7 @@ function createFiberRoot(
3371833722
return root;
3371933723
}
3372033724

33721-
var ReactVersion = "18.3.0-www-modern-91db4189";
33725+
var ReactVersion = "18.3.0-www-modern-feebe80d";
3372233726

3372333727
function createPortal$1(
3372433728
children,

compiled/facebook-www/ReactDOM-prod.classic.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9430,8 +9430,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
94309430
pingedLanes = root.callbackNode;
94319431
if (
94329432
0 === suspendedLanes ||
9433-
(2 === workInProgressSuspendedReason && root === currentTime) ||
9434-
(null !== root.cancelPendingCommit && 0 === (suspendedLanes & 42))
9433+
(root === currentTime && 2 === workInProgressSuspendedReason) ||
9434+
null !== root.cancelPendingCommit
94359435
)
94369436
return (
94379437
null !== pingedLanes &&
@@ -9604,10 +9604,12 @@ function requestUpdateLane(fiber) {
96049604
return fiber;
96059605
}
96069606
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
9607-
2 === workInProgressSuspendedReason &&
9608-
root === workInProgressRoot &&
9609-
(prepareFreshStack(root, 0),
9610-
markRootSuspended(root, workInProgressRootRenderLanes));
9607+
if (
9608+
(root === workInProgressRoot && 2 === workInProgressSuspendedReason) ||
9609+
null !== root.cancelPendingCommit
9610+
)
9611+
prepareFreshStack(root, 0),
9612+
markRootSuspended(root, workInProgressRootRenderLanes);
96119613
markRootUpdated(root, lane, eventTime);
96129614
if (0 === (executionContext & 2) || root !== workInProgressRoot) {
96139615
if (
@@ -15956,7 +15958,7 @@ Internals.Events = [
1595615958
var devToolsConfig$jscomp$inline_1810 = {
1595715959
findFiberByHostInstance: getClosestInstanceFromNode,
1595815960
bundleType: 0,
15959-
version: "18.3.0-www-classic-5232be82",
15961+
version: "18.3.0-www-classic-ecc92a93",
1596015962
rendererPackageName: "react-dom"
1596115963
};
1596215964
var internals$jscomp$inline_2206 = {
@@ -15986,7 +15988,7 @@ var internals$jscomp$inline_2206 = {
1598615988
scheduleRoot: null,
1598715989
setRefreshHandler: null,
1598815990
getCurrentFiber: null,
15989-
reconcilerVersion: "18.3.0-www-classic-5232be82"
15991+
reconcilerVersion: "18.3.0-www-classic-ecc92a93"
1599015992
};
1599115993
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1599215994
var hook$jscomp$inline_2207 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16226,4 +16228,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
1622616228
);
1622716229
};
1622816230
exports.unstable_runWithPriority = runWithPriority;
16229-
exports.version = "18.3.0-www-classic-5232be82";
16231+
exports.version = "18.3.0-www-classic-ecc92a93";

compiled/facebook-www/ReactDOM-prod.modern.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9257,8 +9257,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
92579257
pingedLanes = root.callbackNode;
92589258
if (
92599259
0 === suspendedLanes ||
9260-
(2 === workInProgressSuspendedReason && root === currentTime) ||
9261-
(null !== root.cancelPendingCommit && 0 === (suspendedLanes & 42))
9260+
(root === currentTime && 2 === workInProgressSuspendedReason) ||
9261+
null !== root.cancelPendingCommit
92629262
)
92639263
return (
92649264
null !== pingedLanes &&
@@ -9431,10 +9431,12 @@ function requestUpdateLane(fiber) {
94319431
return fiber;
94329432
}
94339433
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
9434-
2 === workInProgressSuspendedReason &&
9435-
root === workInProgressRoot &&
9436-
(prepareFreshStack(root, 0),
9437-
markRootSuspended(root, workInProgressRootRenderLanes));
9434+
if (
9435+
(root === workInProgressRoot && 2 === workInProgressSuspendedReason) ||
9436+
null !== root.cancelPendingCommit
9437+
)
9438+
prepareFreshStack(root, 0),
9439+
markRootSuspended(root, workInProgressRootRenderLanes);
94389440
markRootUpdated(root, lane, eventTime);
94399441
if (0 === (executionContext & 2) || root !== workInProgressRoot) {
94409442
if (
@@ -15483,7 +15485,7 @@ Internals.Events = [
1548315485
var devToolsConfig$jscomp$inline_1768 = {
1548415486
findFiberByHostInstance: getClosestInstanceFromNode,
1548515487
bundleType: 0,
15486-
version: "18.3.0-www-modern-e611fbd0",
15488+
version: "18.3.0-www-modern-1b7cf3c0",
1548715489
rendererPackageName: "react-dom"
1548815490
};
1548915491
var internals$jscomp$inline_2169 = {
@@ -15514,7 +15516,7 @@ var internals$jscomp$inline_2169 = {
1551415516
scheduleRoot: null,
1551515517
setRefreshHandler: null,
1551615518
getCurrentFiber: null,
15517-
reconcilerVersion: "18.3.0-www-modern-e611fbd0"
15519+
reconcilerVersion: "18.3.0-www-modern-1b7cf3c0"
1551815520
};
1551915521
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1552015522
var hook$jscomp$inline_2170 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15683,4 +15685,4 @@ exports.unstable_createEventHandle = function (type, options) {
1568315685
return eventHandle;
1568415686
};
1568515687
exports.unstable_runWithPriority = runWithPriority;
15686-
exports.version = "18.3.0-www-modern-e611fbd0";
15688+
exports.version = "18.3.0-www-modern-1b7cf3c0";

0 commit comments

Comments
 (0)