Treat displayName as undefined (#26148)

When we have a key we read displayName eagerly for future warnings.

In general, React should be inspecting if something is a client
reference before dotting into it. However, we use displayName a lot and
it kind of has defined meaning for debugging everywhere it's used so
seems fine to treat this as undefined.

DiffTrain build for [c8510227c1](https://github.com/facebook/react/commit/c8510227c1b9c4049979b81e998ec40545e2ce9b)
[View git log for this commit](https://github.com/facebook/react/commits/c8510227c1b9c4049979b81e998ec40545e2ce9b)
This commit is contained in:
sebmarkbage
2023-02-10 16:31:32 +00:00
parent 33d2304b83
commit 38cdbc28fc
28 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -1 +1 @@
55542bc73decab8337df3f7e519451b28593b04e
c8510227c1b9c4049979b81e998ec40545e2ce9b
+1 -1
View File
@@ -1 +1 @@
55542bc73decab8337df3f7e519451b28593b04e
c8510227c1b9c4049979b81e998ec40545e2ce9b
+1 -1
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-classic-55542bc73-20230210";
var ReactVersion = "18.3.0-www-classic-c8510227c-20230210";
// ATTENTION
// When adding new symbols to this file,
+1 -1
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-modern-55542bc73-20230210";
var ReactVersion = "18.3.0-www-modern-c8510227c-20230210";
// ATTENTION
// When adding new symbols to this file,
+1 -1
View File
@@ -646,4 +646,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-55542bc73-20230210";
exports.version = "18.3.0-www-classic-c8510227c-20230210";
+1 -1
View File
@@ -638,4 +638,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-55542bc73-20230210";
exports.version = "18.3.0-www-modern-c8510227c-20230210";
@@ -657,7 +657,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-55542bc73-20230210";
exports.version = "18.3.0-www-classic-c8510227c-20230210";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -649,7 +649,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-55542bc73-20230210";
exports.version = "18.3.0-www-modern-c8510227c-20230210";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-classic-55542bc73-20230210";
var ReactVersion = "18.3.0-www-classic-c8510227c-20230210";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
+1 -1
View File
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-modern-55542bc73-20230210";
var ReactVersion = "18.3.0-www-modern-c8510227c-20230210";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -9844,7 +9844,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-classic-55542bc73-20230210",
version: "18.3.0-www-classic-c8510227c-20230210",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1318 = {
@@ -9875,7 +9875,7 @@ var internals$jscomp$inline_1318 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-55542bc73-20230210"
reconcilerVersion: "18.3.0-next-c8510227c-20230210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1319 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9509,7 +9509,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-55542bc73-20230210",
version: "18.3.0-www-modern-c8510227c-20230210",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1309 = {
@@ -9540,7 +9540,7 @@ var internals$jscomp$inline_1309 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-55542bc73-20230210"
reconcilerVersion: "18.3.0-next-c8510227c-20230210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1310 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -41950,7 +41950,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-55542bc73-20230210";
var ReactVersion = "18.3.0-www-classic-c8510227c-20230210";
function createPortal(
children,
+1 -1
View File
@@ -41674,7 +41674,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-55542bc73-20230210";
var ReactVersion = "18.3.0-www-modern-c8510227c-20230210";
function createPortal(
children,
@@ -15433,7 +15433,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1743 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-55542bc73-20230210",
version: "18.3.0-www-classic-c8510227c-20230210",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2106 = {
@@ -15463,7 +15463,7 @@ var internals$jscomp$inline_2106 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-55542bc73-20230210"
reconcilerVersion: "18.3.0-next-c8510227c-20230210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2107 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15711,4 +15711,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-55542bc73-20230210";
exports.version = "18.3.0-next-c8510227c-20230210";
@@ -14993,7 +14993,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1711 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-55542bc73-20230210",
version: "18.3.0-www-modern-c8510227c-20230210",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2081 = {
@@ -15024,7 +15024,7 @@ var internals$jscomp$inline_2081 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-55542bc73-20230210"
reconcilerVersion: "18.3.0-next-c8510227c-20230210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2082 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15212,4 +15212,4 @@ exports.unstable_flushControlled = function (fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-55542bc73-20230210";
exports.version = "18.3.0-next-c8510227c-20230210";
@@ -16203,7 +16203,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1817 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-55542bc73-20230210",
version: "18.3.0-www-classic-c8510227c-20230210",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -16247,7 +16247,7 @@ var devToolsConfig$jscomp$inline_1817 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-55542bc73-20230210"
reconcilerVersion: "18.3.0-next-c8510227c-20230210"
});
assign(Internals, {
ReactBrowserEventEmitter: {
@@ -16482,7 +16482,7 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-55542bc73-20230210";
exports.version = "18.3.0-next-c8510227c-20230210";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -15753,7 +15753,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1785 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-55542bc73-20230210",
version: "18.3.0-www-modern-c8510227c-20230210",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -15798,7 +15798,7 @@ var devToolsConfig$jscomp$inline_1785 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-55542bc73-20230210"
reconcilerVersion: "18.3.0-next-c8510227c-20230210"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function (children, container) {
@@ -15973,7 +15973,7 @@ exports.unstable_flushControlled = function (fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-55542bc73-20230210";
exports.version = "18.3.0-next-c8510227c-20230210";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");
var ReactVersion = "18.3.0-www-classic-55542bc73-20230210";
var ReactVersion = "18.3.0-www-classic-c8510227c-20230210";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");
var ReactVersion = "18.3.0-www-modern-55542bc73-20230210";
var ReactVersion = "18.3.0-www-modern-c8510227c-20230210";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -3653,4 +3653,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-55542bc73-20230210";
exports.version = "18.3.0-www-classic-c8510227c-20230210";
@@ -3561,4 +3561,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-55542bc73-20230210";
exports.version = "18.3.0-www-modern-c8510227c-20230210";
@@ -31317,7 +31317,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-55542bc73-20230210";
var ReactVersion = "18.3.0-www-classic-c8510227c-20230210";
function createPortal(
children,
@@ -37769,7 +37769,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-55542bc73-20230210";
var ReactVersion = "18.3.0-www-modern-c8510227c-20230210";
function createPortal(
children,
@@ -11553,7 +11553,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1538 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-55542bc73-20230210",
version: "18.3.0-www-classic-c8510227c-20230210",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2057 = {
@@ -11583,7 +11583,7 @@ var internals$jscomp$inline_2057 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-55542bc73-20230210"
reconcilerVersion: "18.3.0-next-c8510227c-20230210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2058 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -14761,4 +14761,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-55542bc73-20230210";
exports.version = "18.3.0-next-c8510227c-20230210";
@@ -13868,7 +13868,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1666 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-55542bc73-20230210",
version: "18.3.0-www-modern-c8510227c-20230210",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2044 = {
@@ -13899,7 +13899,7 @@ var internals$jscomp$inline_2044 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-55542bc73-20230210"
reconcilerVersion: "18.3.0-next-c8510227c-20230210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2045 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -14230,4 +14230,4 @@ exports.unstable_flushControlled = function (fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-55542bc73-20230210";
exports.version = "18.3.0-next-c8510227c-20230210";
@@ -23913,7 +23913,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-55542bc73-20230210";
var ReactVersion = "18.3.0-www-classic-c8510227c-20230210";
// Might add PROFILE later.
@@ -23913,7 +23913,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-55542bc73-20230210";
var ReactVersion = "18.3.0-www-modern-c8510227c-20230210";
// Might add PROFILE later.