Skip to content

Commit

Permalink
[Fizz] Allow aborting during render (#30488)
Browse files Browse the repository at this point in the history
Currently if you abort a Fizz render during rendering the render will
not complete correctly because there are inconsistencies with task
counting. This change updates the abort implementation to allow you to
abort from within a render itself. We already landed a similar change
for Flight in #29764

DiffTrain build for [a451de0](a451de0)
  • Loading branch information
gnoff committed Jul 29, 2024
1 parent 1cde450 commit 05ad651
Show file tree
Hide file tree
Showing 36 changed files with 1,369 additions and 1,167 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9938e248feecc6410738cc905744836d6f78c7f8
a451de014ca71718aee924bb57d5b4a1d87e20f2
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9938e248feecc6410738cc905744836d6f78c7f8
a451de014ca71718aee924bb57d5b4a1d87e20f2
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2004,7 +2004,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,4 +668,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,4 +668,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17183,14 +17183,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -16591,14 +16591,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10820,7 +10820,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1385 = {
Expand Down Expand Up @@ -10851,7 +10851,7 @@ var internals$jscomp$inline_1385 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1386 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -10323,7 +10323,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1371 = {
Expand Down Expand Up @@ -10354,7 +10354,7 @@ var internals$jscomp$inline_1371 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1372 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -27805,11 +27805,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-9938e248-20240729" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-a451de01-20240729" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-classic-9938e248-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-a451de01-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27875,12 +27875,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
Expand Down Expand Up @@ -28516,7 +28516,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -26907,11 +26907,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-9938e248-20240729" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-a451de01-20240729" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-modern-9938e248-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-a451de01-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -26976,12 +26976,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
Expand Down Expand Up @@ -27569,7 +27569,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17294,14 +17294,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1776 = React.version;
if (
"19.0.0-www-classic-9938e248-20240729" !==
"19.0.0-www-classic-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1776
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1776,
"19.0.0-www-classic-9938e248-20240729"
"19.0.0-www-classic-a451de01-20240729"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -17347,7 +17347,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1783 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2221 = {
Expand Down Expand Up @@ -17377,7 +17377,7 @@ var internals$jscomp$inline_2221 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2222 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17833,4 +17833,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -16659,14 +16659,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1747 = React.version;
if (
"19.0.0-www-modern-9938e248-20240729" !==
"19.0.0-www-modern-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1747
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1747,
"19.0.0-www-modern-9938e248-20240729"
"19.0.0-www-modern-a451de01-20240729"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -16685,7 +16685,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1749 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2212 = {
Expand Down Expand Up @@ -16715,7 +16715,7 @@ var internals$jscomp$inline_2212 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2213 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17078,4 +17078,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -18069,14 +18069,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1864 = React.version;
if (
"19.0.0-www-classic-9938e248-20240729" !==
"19.0.0-www-classic-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1864
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1864,
"19.0.0-www-classic-9938e248-20240729"
"19.0.0-www-classic-a451de01-20240729"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -18122,7 +18122,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1871 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -18166,7 +18166,7 @@ var devToolsConfig$jscomp$inline_1871 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
function ReactDOMRoot(internalRoot) {
this._internalRoot = internalRoot;
Expand Down Expand Up @@ -18609,7 +18609,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -17417,14 +17417,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1835 = React.version;
if (
"19.0.0-www-modern-9938e248-20240729" !==
"19.0.0-www-modern-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1835
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1835,
"19.0.0-www-modern-9938e248-20240729"
"19.0.0-www-modern-a451de01-20240729"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17443,7 +17443,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1837 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17487,7 +17487,7 @@ var devToolsConfig$jscomp$inline_1837 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
function ReactDOMRoot(internalRoot) {
this._internalRoot = internalRoot;
Expand Down Expand Up @@ -17837,7 +17837,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit 05ad651

Please sign in to comment.