Skip to content

Commit

Permalink
Remove unused lastFullyObservedContext (#31435)
Browse files Browse the repository at this point in the history
DiffTrain build for [66855b9](66855b9)
  • Loading branch information
sophiebits committed Nov 6, 2024
1 parent 728c473 commit 023b265
Show file tree
Hide file tree
Showing 34 changed files with 716 additions and 942 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d1f04722d617600cc6cd96dcebc1c2ef7affc904
66855b96378daedb1405e83f2365e0d90966ea0e
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d1f04722d617600cc6cd96dcebc1c2ef7affc904
66855b96378daedb1405e83f2365e0d90966ea0e
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 @@ -1995,7 +1995,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-d1f04722-20241106";
exports.version = "19.0.0-www-classic-66855b96-20241106";
"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 @@ -1975,7 +1975,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-d1f04722-20241106";
exports.version = "19.0.0-www-modern-66855b96-20241106";
"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 @@ -686,4 +686,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-d1f04722-20241106";
exports.version = "19.0.0-www-classic-66855b96-20241106";
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 @@ -686,4 +686,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-d1f04722-20241106";
exports.version = "19.0.0-www-modern-66855b96-20241106";
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 @@ -690,7 +690,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-d1f04722-20241106";
exports.version = "19.0.0-www-classic-66855b96-20241106";
"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 @@ -690,7 +690,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-d1f04722-20241106";
exports.version = "19.0.0-www-modern-66855b96-20241106";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
88 changes: 39 additions & 49 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -4284,29 +4284,26 @@ __DEV__ &&
else {
JSCompiler_temp = currentlyRenderingFiber;
var value = context._currentValue2;
if (lastFullyObservedContext !== context)
if (
((context = {
context: context,
memoizedValue: value,
next: null,
select: select,
lastSelectedValue: select(value)
}),
null === lastContextDependency)
) {
if (null === JSCompiler_temp)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context;
JSCompiler_temp.dependencies = {
lanes: 0,
firstContext: context,
_debugThenableState: null
};
JSCompiler_temp.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context;
context = {
context: context,
memoizedValue: value,
next: null,
select: select,
lastSelectedValue: select(value)
};
if (null === lastContextDependency) {
if (null === JSCompiler_temp)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context;
JSCompiler_temp.dependencies = {
lanes: 0,
firstContext: context,
_debugThenableState: null
};
JSCompiler_temp.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context;
JSCompiler_temp = value;
}
return JSCompiler_temp;
Expand Down Expand Up @@ -8585,10 +8582,7 @@ __DEV__ &&
);
}
function resetContextDependencies() {
lastFullyObservedContext =
lastContextDependency =
currentlyRenderingFiber =
null;
lastContextDependency = currentlyRenderingFiber = null;
isDisallowedContextReadInDEV = !1;
}
function pushProvider(providerFiber, context, nextValue) {
Expand Down Expand Up @@ -8794,7 +8788,7 @@ __DEV__ &&
}
function prepareToReadContext(workInProgress) {
currentlyRenderingFiber = workInProgress;
lastFullyObservedContext = lastContextDependency = null;
lastContextDependency = null;
workInProgress = workInProgress.dependencies;
null !== workInProgress && (workInProgress.firstContext = null);
}
Expand All @@ -8811,23 +8805,20 @@ __DEV__ &&
}
function readContextForConsumer(consumer, context) {
var value = context._currentValue2;
if (lastFullyObservedContext !== context)
if (
((context = { context: context, memoizedValue: value, next: null }),
null === lastContextDependency)
) {
if (null === consumer)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context;
consumer.dependencies = {
lanes: 0,
firstContext: context,
_debugThenableState: null
};
consumer.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context;
context = { context: context, memoizedValue: value, next: null };
if (null === lastContextDependency) {
if (null === consumer)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context;
consumer.dependencies = {
lanes: 0,
firstContext: context,
_debugThenableState: null
};
consumer.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context;
return value;
}
function createCache() {
Expand Down Expand Up @@ -16687,7 +16678,6 @@ __DEV__ &&
var rendererSigil = {};
var currentlyRenderingFiber = null,
lastContextDependency = null,
lastFullyObservedContext = null,
isDisallowedContextReadInDEV = !1,
AbortControllerLocal =
"undefined" !== typeof AbortController
Expand Down Expand Up @@ -17053,11 +17043,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-d1f04722-20241106",
version: "19.0.0-www-classic-66855b96-20241106",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-d1f04722-20241106"
reconcilerVersion: "19.0.0-www-classic-66855b96-20241106"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -17091,7 +17081,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-d1f04722-20241106";
exports.version = "19.0.0-www-classic-66855b96-20241106";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
88 changes: 39 additions & 49 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -4160,29 +4160,26 @@ __DEV__ &&
else {
JSCompiler_temp = currentlyRenderingFiber;
var value = context._currentValue2;
if (lastFullyObservedContext !== context)
if (
((context = {
context: context,
memoizedValue: value,
next: null,
select: select,
lastSelectedValue: select(value)
}),
null === lastContextDependency)
) {
if (null === JSCompiler_temp)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context;
JSCompiler_temp.dependencies = {
lanes: 0,
firstContext: context,
_debugThenableState: null
};
JSCompiler_temp.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context;
context = {
context: context,
memoizedValue: value,
next: null,
select: select,
lastSelectedValue: select(value)
};
if (null === lastContextDependency) {
if (null === JSCompiler_temp)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context;
JSCompiler_temp.dependencies = {
lanes: 0,
firstContext: context,
_debugThenableState: null
};
JSCompiler_temp.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context;
JSCompiler_temp = value;
}
return JSCompiler_temp;
Expand Down Expand Up @@ -8240,10 +8237,7 @@ __DEV__ &&
);
}
function resetContextDependencies() {
lastFullyObservedContext =
lastContextDependency =
currentlyRenderingFiber =
null;
lastContextDependency = currentlyRenderingFiber = null;
isDisallowedContextReadInDEV = !1;
}
function pushProvider(providerFiber, context, nextValue) {
Expand Down Expand Up @@ -8449,7 +8443,7 @@ __DEV__ &&
}
function prepareToReadContext(workInProgress) {
currentlyRenderingFiber = workInProgress;
lastFullyObservedContext = lastContextDependency = null;
lastContextDependency = null;
workInProgress = workInProgress.dependencies;
null !== workInProgress && (workInProgress.firstContext = null);
}
Expand All @@ -8466,23 +8460,20 @@ __DEV__ &&
}
function readContextForConsumer(consumer, context) {
var value = context._currentValue2;
if (lastFullyObservedContext !== context)
if (
((context = { context: context, memoizedValue: value, next: null }),
null === lastContextDependency)
) {
if (null === consumer)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context;
consumer.dependencies = {
lanes: 0,
firstContext: context,
_debugThenableState: null
};
consumer.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context;
context = { context: context, memoizedValue: value, next: null };
if (null === lastContextDependency) {
if (null === consumer)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context;
consumer.dependencies = {
lanes: 0,
firstContext: context,
_debugThenableState: null
};
consumer.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context;
return value;
}
function createCache() {
Expand Down Expand Up @@ -16131,7 +16122,6 @@ __DEV__ &&
var rendererSigil = {};
var currentlyRenderingFiber = null,
lastContextDependency = null,
lastFullyObservedContext = null,
isDisallowedContextReadInDEV = !1,
AbortControllerLocal =
"undefined" !== typeof AbortController
Expand Down Expand Up @@ -16496,11 +16486,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-modern-d1f04722-20241106",
version: "19.0.0-www-modern-66855b96-20241106",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-d1f04722-20241106"
reconcilerVersion: "19.0.0-www-modern-66855b96-20241106"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16534,7 +16524,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-d1f04722-20241106";
exports.version = "19.0.0-www-modern-66855b96-20241106";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit 023b265

Please sign in to comment.