Skip to content

Commit

Permalink
Clean up deferRenderPhaseUpdateToNextBatch (#26511)
Browse files Browse the repository at this point in the history
This is a change to some undefined behavior that we though we would do
at one point but decided not to roll out. It's already disabled
everywhere, so this just deletes the branch from the implementation and
the tests.

DiffTrain build for commit 2d51251.
  • Loading branch information
acdlite committed Mar 30, 2023
1 parent f115265 commit fea9a7d
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19780,10 +19780,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {

if (root === workInProgressRoot) {
// Received an update to a tree that's in the middle of rendering. Mark
// that there was an interleaved update work on this root. Unless the
// `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
// phase update. In that case, we don't treat render phase updates as if
// they were interleaved, for backwards compat reasons.
// that there was an interleaved update work on this root.
if ((executionContext & RenderContext) === NoContext) {
workInProgressRootInterleavedUpdatedLanes = mergeLanes(
workInProgressRootInterleavedUpdatedLanes,
Expand Down Expand Up @@ -19823,11 +19820,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
function isUnsafeClassRenderPhaseUpdate(fiber) {
// Check if this is a render phase update. Only called by class components,
// which special (deprecated) behavior for UNSAFE_componentWillReceive props.
return (
// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
// decided not to enable it.
(executionContext & RenderContext) !== NoContext
);
return (executionContext & RenderContext) !== NoContext;
} // Use this function to schedule a task for a root. There's only one task per
// root; if a task was already scheduled, we'll check to make sure the priority
// of the existing task is the same as the priority of the next level that the
Expand Down Expand Up @@ -23762,7 +23755,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-0ffc7f632-20230330";
var ReactVersion = "18.3.0-next-2d51251e6-20230330";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8640,7 +8640,7 @@ var devToolsConfig$jscomp$inline_1007 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-0ffc7f632-20230330",
version: "18.3.0-next-2d51251e6-20230330",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1198 = {
Expand Down Expand Up @@ -8671,7 +8671,7 @@ var internals$jscomp$inline_1198 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-0ffc7f632-20230330"
reconcilerVersion: "18.3.0-next-2d51251e6-20230330"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1199 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9065,7 +9065,7 @@ var devToolsConfig$jscomp$inline_1050 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-0ffc7f632-20230330",
version: "18.3.0-next-2d51251e6-20230330",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1239 = {
Expand Down Expand Up @@ -9096,7 +9096,7 @@ var internals$jscomp$inline_1239 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-0ffc7f632-20230330"
reconcilerVersion: "18.3.0-next-2d51251e6-20230330"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1240 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-next-0ffc7f632-20230330";
var ReactVersion = "18.3.0-next-2d51251e6-20230330";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-0ffc7f632-20230330";
exports.version = "18.3.0-next-2d51251e6-20230330";
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-0ffc7f632-20230330";
exports.version = "18.3.0-next-2d51251e6-20230330";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0ffc7f632b5cdc2d4ede97b6f8ff55e02183bdf9
2d51251e608b7b1a8baf79ae6bdba81ed8e1939a
Original file line number Diff line number Diff line change
Expand Up @@ -22844,10 +22844,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {

if (root === workInProgressRoot) {
// Received an update to a tree that's in the middle of rendering. Mark
// that there was an interleaved update work on this root. Unless the
// `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
// phase update. In that case, we don't treat render phase updates as if
// they were interleaved, for backwards compat reasons.
// that there was an interleaved update work on this root.
if ((executionContext & RenderContext) === NoContext) {
workInProgressRootInterleavedUpdatedLanes = mergeLanes(
workInProgressRootInterleavedUpdatedLanes,
Expand Down Expand Up @@ -22887,11 +22884,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
function isUnsafeClassRenderPhaseUpdate(fiber) {
// Check if this is a render phase update. Only called by class components,
// which special (deprecated) behavior for UNSAFE_componentWillReceive props.
return (
// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
// decided not to enable it.
(executionContext & RenderContext) !== NoContext
);
return (executionContext & RenderContext) !== NoContext;
} // Use this function to schedule a task for a root. There's only one task per
// root; if a task was already scheduled, we'll check to make sure the priority
// of the existing task is the same as the priority of the next level that the
Expand Down Expand Up @@ -27028,7 +27021,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-0ffc7f632-20230330";
var ReactVersion = "18.3.0-next-2d51251e6-20230330";

function createPortal$1(
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9507,7 +9507,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1027 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-0ffc7f632-20230330",
version: "18.3.0-next-2d51251e6-20230330",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -9549,7 +9549,7 @@ var internals$jscomp$inline_1273 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-0ffc7f632-20230330"
reconcilerVersion: "18.3.0-next-2d51251e6-20230330"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1274 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10215,7 +10215,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1106 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-0ffc7f632-20230330",
version: "18.3.0-next-2d51251e6-20230330",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -10270,7 +10270,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-0ffc7f632-20230330"
reconcilerVersion: "18.3.0-next-2d51251e6-20230330"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23384,10 +23384,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {

if (root === workInProgressRoot) {
// Received an update to a tree that's in the middle of rendering. Mark
// that there was an interleaved update work on this root. Unless the
// `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
// phase update. In that case, we don't treat render phase updates as if
// they were interleaved, for backwards compat reasons.
// that there was an interleaved update work on this root.
if ((executionContext & RenderContext) === NoContext) {
workInProgressRootInterleavedUpdatedLanes = mergeLanes(
workInProgressRootInterleavedUpdatedLanes,
Expand Down Expand Up @@ -23427,11 +23424,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
function isUnsafeClassRenderPhaseUpdate(fiber) {
// Check if this is a render phase update. Only called by class components,
// which special (deprecated) behavior for UNSAFE_componentWillReceive props.
return (
// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
// decided not to enable it.
(executionContext & RenderContext) !== NoContext
);
return (executionContext & RenderContext) !== NoContext;
} // Use this function to schedule a task for a root. There's only one task per
// root; if a task was already scheduled, we'll check to make sure the priority
// of the existing task is the same as the priority of the next level that the
Expand Down Expand Up @@ -27568,7 +27561,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-0ffc7f632-20230330";
var ReactVersion = "18.3.0-next-2d51251e6-20230330";

function createPortal$1(
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9763,7 +9763,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1086 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-0ffc7f632-20230330",
version: "18.3.0-next-2d51251e6-20230330",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -9805,7 +9805,7 @@ var internals$jscomp$inline_1339 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-0ffc7f632-20230330"
reconcilerVersion: "18.3.0-next-2d51251e6-20230330"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1340 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10471,7 +10471,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1165 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-0ffc7f632-20230330",
version: "18.3.0-next-2d51251e6-20230330",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -10526,7 +10526,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-0ffc7f632-20230330"
reconcilerVersion: "18.3.0-next-2d51251e6-20230330"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {
Expand Down

0 comments on commit fea9a7d

Please sign in to comment.