GeezerVison is showing github.com — Track Owner for Server Components in DEV (#28753) · react/react@75004cd
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/JSXDEVRuntime-dev.classic.js +16-20Lines changed: 16 additions & 20 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -488,7 +488,7 @@ if (__DEV__) { | 488 | 488 |
| 489 | 489 | var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; | 490 | 490 | var prefix; | 491 | | - function describeBuiltInComponentFrame(name, ownerFn) { | | 491 | + function describeBuiltInComponentFrame(name) { | 492 | 492 | { | 493 | 493 | if (prefix === undefined) { | 494 | 494 | // Extract the VM specific prefix used by each line. | @@ -757,7 +757,7 @@ if (__DEV__) { | 757 | 757 |
| 758 | 758 | return syntheticFrame; | 759 | 759 | } | 760 | | - function describeFunctionComponentFrame(fn, ownerFn) { | | 760 | + function describeFunctionComponentFrame(fn) { | 761 | 761 | { | 762 | 762 | return describeNativeComponentFrame(fn, false); | 763 | 763 | } | @@ -768,7 +768,7 @@ if (__DEV__) { | 768 | 768 | return !!(prototype && prototype.isReactComponent); | 769 | 769 | } | 770 | 770 |
| 771 | | - function describeUnknownElementTypeFrameInDEV(type, ownerFn) { | | 771 | + function describeUnknownElementTypeFrameInDEV(type) { | 772 | 772 | if (type == null) { | 773 | 773 | return ""; | 774 | 774 | } | @@ -798,7 +798,7 @@ if (__DEV__) { | 798 | 798 |
| 799 | 799 | case REACT_MEMO_TYPE: | 800 | 800 | // Memo may contain any component type so we recursively resolve it. | 801 | | - return describeUnknownElementTypeFrameInDEV(type.type, ownerFn); | | 801 | + return describeUnknownElementTypeFrameInDEV(type.type); | 802 | 802 |
| 803 | 803 | case REACT_LAZY_TYPE: { | 804 | 804 | var lazyComponent = type; | @@ -807,10 +807,7 @@ if (__DEV__) { | 807 | 807 |
| 808 | 808 | try { | 809 | 809 | // Lazy may contain any component type so we recursively resolve it. | 810 | | - return describeUnknownElementTypeFrameInDEV( | 811 | | - init(payload), | 812 | | - ownerFn | 813 | | - ); | | 810 | + return describeUnknownElementTypeFrameInDEV(init(payload)); | 814 | 811 | } catch (x) {} | 815 | 812 | } | 816 | 813 | } | @@ -862,7 +859,6 @@ if (__DEV__) { | 862 | 859 | function getContextName(type) { | 863 | 860 | return type.displayName || "Context"; | 864 | 861 | } | 865 | | - | 866 | 862 | function getComponentNameFromFiber(fiber) { | 867 | 863 | var tag = fiber.tag, | 868 | 864 | type = fiber.type; | @@ -1578,14 +1574,18 @@ if (__DEV__) { | 1578 | 1574 |
| 1579 | 1575 | if ( | 1580 | 1576 | element && | 1581 | | - element._owner && | | 1577 | + element._owner != null && | 1582 | 1578 | element._owner !== ReactCurrentOwner.current | 1583 | 1579 | ) { | 1584 | | - // Give the component that originally created this child. | 1585 | | - childOwner = | 1586 | | - " It was passed a child from " + | 1587 | | - getComponentNameFromType(element._owner.type) + | 1588 | | - "."; | | 1580 | + var ownerName = null; | | 1581 | + | | 1582 | + if (typeof element._owner.tag === "number") { | | 1583 | + ownerName = getComponentNameFromType(element._owner.type); | | 1584 | + } else if (typeof element._owner.name === "string") { | | 1585 | + ownerName = element._owner.name; | | 1586 | + } // Give the component that originally created this child. | | 1587 | + | | 1588 | + childOwner = " It was passed a child from " + ownerName + "."; | 1589 | 1589 | } | 1590 | 1590 |
| 1591 | 1591 | setCurrentlyValidatingElement(element); | @@ -1604,11 +1604,7 @@ if (__DEV__) { | 1604 | 1604 | function setCurrentlyValidatingElement(element) { | 1605 | 1605 | { | 1606 | 1606 | if (element) { | 1607 | | - var owner = element._owner; | 1608 | | - var stack = describeUnknownElementTypeFrameInDEV( | 1609 | | - element.type, | 1610 | | - owner ? owner.type : null | 1611 | | - ); | | 1607 | + var stack = describeUnknownElementTypeFrameInDEV(element.type); | 1612 | 1608 | ReactDebugCurrentFrame.setExtraStackFrame(stack); | 1613 | 1609 | } else { | 1614 | 1610 | ReactDebugCurrentFrame.setExtraStackFrame(null); | |
Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/JSXDEVRuntime-dev.modern.js +16-20Lines changed: 16 additions & 20 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -488,7 +488,7 @@ if (__DEV__) { | 488 | 488 |
| 489 | 489 | var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; | 490 | 490 | var prefix; | 491 | | - function describeBuiltInComponentFrame(name, ownerFn) { | | 491 | + function describeBuiltInComponentFrame(name) { | 492 | 492 | { | 493 | 493 | if (prefix === undefined) { | 494 | 494 | // Extract the VM specific prefix used by each line. | @@ -757,7 +757,7 @@ if (__DEV__) { | 757 | 757 |
| 758 | 758 | return syntheticFrame; | 759 | 759 | } | 760 | | - function describeFunctionComponentFrame(fn, ownerFn) { | | 760 | + function describeFunctionComponentFrame(fn) { | 761 | 761 | { | 762 | 762 | return describeNativeComponentFrame(fn, false); | 763 | 763 | } | @@ -768,7 +768,7 @@ if (__DEV__) { | 768 | 768 | return !!(prototype && prototype.isReactComponent); | 769 | 769 | } | 770 | 770 |
| 771 | | - function describeUnknownElementTypeFrameInDEV(type, ownerFn) { | | 771 | + function describeUnknownElementTypeFrameInDEV(type) { | 772 | 772 | if (type == null) { | 773 | 773 | return ""; | 774 | 774 | } | @@ -798,7 +798,7 @@ if (__DEV__) { | 798 | 798 |
| 799 | 799 | case REACT_MEMO_TYPE: | 800 | 800 | // Memo may contain any component type so we recursively resolve it. | 801 | | - return describeUnknownElementTypeFrameInDEV(type.type, ownerFn); | | 801 | + return describeUnknownElementTypeFrameInDEV(type.type); | 802 | 802 |
| 803 | 803 | case REACT_LAZY_TYPE: { | 804 | 804 | var lazyComponent = type; | @@ -807,10 +807,7 @@ if (__DEV__) { | 807 | 807 |
| 808 | 808 | try { | 809 | 809 | // Lazy may contain any component type so we recursively resolve it. | 810 | | - return describeUnknownElementTypeFrameInDEV( | 811 | | - init(payload), | 812 | | - ownerFn | 813 | | - ); | | 810 | + return describeUnknownElementTypeFrameInDEV(init(payload)); | 814 | 811 | } catch (x) {} | 815 | 812 | } | 816 | 813 | } | @@ -862,7 +859,6 @@ if (__DEV__) { | 862 | 859 | function getContextName(type) { | 863 | 860 | return type.displayName || "Context"; | 864 | 861 | } | 865 | | - | 866 | 862 | function getComponentNameFromFiber(fiber) { | 867 | 863 | var tag = fiber.tag, | 868 | 864 | type = fiber.type; | @@ -1580,14 +1576,18 @@ if (__DEV__) { | 1580 | 1576 |
| 1581 | 1577 | if ( | 1582 | 1578 | element && | 1583 | | - element._owner && | | 1579 | + element._owner != null && | 1584 | 1580 | element._owner !== ReactCurrentOwner.current | 1585 | 1581 | ) { | 1586 | | - // Give the component that originally created this child. | 1587 | | - childOwner = | 1588 | | - " It was passed a child from " + | 1589 | | - getComponentNameFromType(element._owner.type) + | 1590 | | - "."; | | 1582 | + var ownerName = null; | | 1583 | + | | 1584 | + if (typeof element._owner.tag === "number") { | | 1585 | + ownerName = getComponentNameFromType(element._owner.type); | | 1586 | + } else if (typeof element._owner.name === "string") { | | 1587 | + ownerName = element._owner.name; | | 1588 | + } // Give the component that originally created this child. | | 1589 | + | | 1590 | + childOwner = " It was passed a child from " + ownerName + "."; | 1591 | 1591 | } | 1592 | 1592 |
| 1593 | 1593 | setCurrentlyValidatingElement(element); | @@ -1606,11 +1606,7 @@ if (__DEV__) { | 1606 | 1606 | function setCurrentlyValidatingElement(element) { | 1607 | 1607 | { | 1608 | 1608 | if (element) { | 1609 | | - var owner = element._owner; | 1610 | | - var stack = describeUnknownElementTypeFrameInDEV( | 1611 | | - element.type, | 1612 | | - owner ? owner.type : null | 1613 | | - ); | | 1609 | + var stack = describeUnknownElementTypeFrameInDEV(element.type); | 1614 | 1610 | ReactDebugCurrentFrame.setExtraStackFrame(stack); | 1615 | 1611 | } else { | 1616 | 1612 | ReactDebugCurrentFrame.setExtraStackFrame(null); | |
Collapse file Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -e3ebcd54b98a4f8f5a9f7e63982fa75578b648ed | | 1 | +f33a6b69c6cb406ea0cc51d07bc4d3fd2d8d8744 |
Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/React-dev.classic.js +17-21Lines changed: 17 additions & 21 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -24,7 +24,7 @@ if (__DEV__) { | 24 | 24 | ) { | 25 | 25 | __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); | 26 | 26 | } | 27 | | - var ReactVersion = "19.0.0-www-classic-943a0b57"; | | 27 | + var ReactVersion = "19.0.0-www-classic-ff21e352"; | 28 | 28 |
| 29 | 29 | // ATTENTION | 30 | 30 | // When adding new symbols to this file, | @@ -860,7 +860,7 @@ if (__DEV__) { | 860 | 860 |
| 861 | 861 | var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; | 862 | 862 | var prefix; | 863 | | - function describeBuiltInComponentFrame(name, ownerFn) { | | 863 | + function describeBuiltInComponentFrame(name) { | 864 | 864 | { | 865 | 865 | if (prefix === undefined) { | 866 | 866 | // Extract the VM specific prefix used by each line. | @@ -1129,7 +1129,7 @@ if (__DEV__) { | 1129 | 1129 |
| 1130 | 1130 | return syntheticFrame; | 1131 | 1131 | } | 1132 | | - function describeFunctionComponentFrame(fn, ownerFn) { | | 1132 | + function describeFunctionComponentFrame(fn) { | 1133 | 1133 | { | 1134 | 1134 | return describeNativeComponentFrame(fn, false); | 1135 | 1135 | } | @@ -1140,7 +1140,7 @@ if (__DEV__) { | 1140 | 1140 | return !!(prototype && prototype.isReactComponent); | 1141 | 1141 | } | 1142 | 1142 |
| 1143 | | - function describeUnknownElementTypeFrameInDEV(type, ownerFn) { | | 1143 | + function describeUnknownElementTypeFrameInDEV(type) { | 1144 | 1144 | if (type == null) { | 1145 | 1145 | return ""; | 1146 | 1146 | } | @@ -1170,7 +1170,7 @@ if (__DEV__) { | 1170 | 1170 |
| 1171 | 1171 | case REACT_MEMO_TYPE: | 1172 | 1172 | // Memo may contain any component type so we recursively resolve it. | 1173 | | - return describeUnknownElementTypeFrameInDEV(type.type, ownerFn); | | 1173 | + return describeUnknownElementTypeFrameInDEV(type.type); | 1174 | 1174 |
| 1175 | 1175 | case REACT_LAZY_TYPE: { | 1176 | 1176 | var lazyComponent = type; | @@ -1179,10 +1179,7 @@ if (__DEV__) { | 1179 | 1179 |
| 1180 | 1180 | try { | 1181 | 1181 | // Lazy may contain any component type so we recursively resolve it. | 1182 | | - return describeUnknownElementTypeFrameInDEV( | 1183 | | - init(payload), | 1184 | | - ownerFn | 1185 | | - ); | | 1182 | + return describeUnknownElementTypeFrameInDEV(init(payload)); | 1186 | 1183 | } catch (x) {} | 1187 | 1184 | } | 1188 | 1185 | } | @@ -1234,7 +1231,6 @@ if (__DEV__) { | 1234 | 1231 | function getContextName(type) { | 1235 | 1232 | return type.displayName || "Context"; | 1236 | 1233 | } | 1237 | | - | 1238 | 1234 | function getComponentNameFromFiber(fiber) { | 1239 | 1235 | var tag = fiber.tag, | 1240 | 1236 | type = fiber.type; | @@ -2302,14 +2298,18 @@ if (__DEV__) { | 2302 | 2298 |
| 2303 | 2299 | if ( | 2304 | 2300 | element && | 2305 | | - element._owner && | | 2301 | + element._owner != null && | 2306 | 2302 | element._owner !== ReactCurrentOwner.current | 2307 | 2303 | ) { | 2308 | | - // Give the component that originally created this child. | 2309 | | - childOwner = | 2310 | | - " It was passed a child from " + | 2311 | | - getComponentNameFromType(element._owner.type) + | 2312 | | - "."; | | 2304 | + var ownerName = null; | | 2305 | + | | 2306 | + if (typeof element._owner.tag === "number") { | | 2307 | + ownerName = getComponentNameFromType(element._owner.type); | | 2308 | + } else if (typeof element._owner.name === "string") { | | 2309 | + ownerName = element._owner.name; | | 2310 | + } // Give the component that originally created this child. | | 2311 | + | | 2312 | + childOwner = " It was passed a child from " + ownerName + "."; | 2313 | 2313 | } | 2314 | 2314 |
| 2315 | 2315 | setCurrentlyValidatingElement(element); | @@ -2328,11 +2328,7 @@ if (__DEV__) { | 2328 | 2328 | function setCurrentlyValidatingElement(element) { | 2329 | 2329 | { | 2330 | 2330 | if (element) { | 2331 | | - var owner = element._owner; | 2332 | | - var stack = describeUnknownElementTypeFrameInDEV( | 2333 | | - element.type, | 2334 | | - owner ? owner.type : null | 2335 | | - ); | | 2331 | + var stack = describeUnknownElementTypeFrameInDEV(element.type); | 2336 | 2332 | ReactDebugCurrentFrame.setExtraStackFrame(stack); | 2337 | 2333 | } else { | 2338 | 2334 | ReactDebugCurrentFrame.setExtraStackFrame(null); | |
Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/React-dev.modern.js +17-21Lines changed: 17 additions & 21 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -24,7 +24,7 @@ if (__DEV__) { | 24 | 24 | ) { | 25 | 25 | __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); | 26 | 26 | } | 27 | | - var ReactVersion = "19.0.0-www-modern-77bd3ad6"; | | 27 | + var ReactVersion = "19.0.0-www-modern-99738e97"; | 28 | 28 |
| 29 | 29 | // ATTENTION | 30 | 30 | // When adding new symbols to this file, | @@ -860,7 +860,7 @@ if (__DEV__) { | 860 | 860 |
| 861 | 861 | var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; | 862 | 862 | var prefix; | 863 | | - function describeBuiltInComponentFrame(name, ownerFn) { | | 863 | + function describeBuiltInComponentFrame(name) { | 864 | 864 | { | 865 | 865 | if (prefix === undefined) { | 866 | 866 | // Extract the VM specific prefix used by each line. | @@ -1129,7 +1129,7 @@ if (__DEV__) { | 1129 | 1129 |
| 1130 | 1130 | return syntheticFrame; | 1131 | 1131 | } | 1132 | | - function describeFunctionComponentFrame(fn, ownerFn) { | | 1132 | + function describeFunctionComponentFrame(fn) { | 1133 | 1133 | { | 1134 | 1134 | return describeNativeComponentFrame(fn, false); | 1135 | 1135 | } | @@ -1140,7 +1140,7 @@ if (__DEV__) { | 1140 | 1140 | return !!(prototype && prototype.isReactComponent); | 1141 | 1141 | } | 1142 | 1142 |
| 1143 | | - function describeUnknownElementTypeFrameInDEV(type, ownerFn) { | | 1143 | + function describeUnknownElementTypeFrameInDEV(type) { | 1144 | 1144 | if (type == null) { | 1145 | 1145 | return ""; | 1146 | 1146 | } | @@ -1170,7 +1170,7 @@ if (__DEV__) { | 1170 | 1170 |
| 1171 | 1171 | case REACT_MEMO_TYPE: | 1172 | 1172 | // Memo may contain any component type so we recursively resolve it. | 1173 | | - return describeUnknownElementTypeFrameInDEV(type.type, ownerFn); | | 1173 | + return describeUnknownElementTypeFrameInDEV(type.type); | 1174 | 1174 |
| 1175 | 1175 | case REACT_LAZY_TYPE: { | 1176 | 1176 | var lazyComponent = type; | @@ -1179,10 +1179,7 @@ if (__DEV__) { | 1179 | 1179 |
| 1180 | 1180 | try { | 1181 | 1181 | // Lazy may contain any component type so we recursively resolve it. | 1182 | | - return describeUnknownElementTypeFrameInDEV( | 1183 | | - init(payload), | 1184 | | - ownerFn | 1185 | | - ); | | 1182 | + return describeUnknownElementTypeFrameInDEV(init(payload)); | 1186 | 1183 | } catch (x) {} | 1187 | 1184 | } | 1188 | 1185 | } | @@ -1234,7 +1231,6 @@ if (__DEV__) { | 1234 | 1231 | function getContextName(type) { | 1235 | 1232 | return type.displayName || "Context"; | 1236 | 1233 | } | 1237 | | - | 1238 | 1234 | function getComponentNameFromFiber(fiber) { | 1239 | 1235 | var tag = fiber.tag, | 1240 | 1236 | type = fiber.type; | @@ -2304,14 +2300,18 @@ if (__DEV__) { | 2304 | 2300 |
| 2305 | 2301 | if ( | 2306 | 2302 | element && | 2307 | | - element._owner && | | 2303 | + element._owner != null && | 2308 | 2304 | element._owner !== ReactCurrentOwner.current | 2309 | 2305 | ) { | 2310 | | - // Give the component that originally created this child. | 2311 | | - childOwner = | 2312 | | - " It was passed a child from " + | 2313 | | - getComponentNameFromType(element._owner.type) + | 2314 | | - "."; | | 2306 | + var ownerName = null; | | 2307 | + | | 2308 | + if (typeof element._owner.tag === "number") { | | 2309 | + ownerName = getComponentNameFromType(element._owner.type); | | 2310 | + } else if (typeof element._owner.name === "string") { | | 2311 | + ownerName = element._owner.name; | | 2312 | + } // Give the component that originally created this child. | | 2313 | + | | 2314 | + childOwner = " It was passed a child from " + ownerName + "."; | 2315 | 2315 | } | 2316 | 2316 |
| 2317 | 2317 | setCurrentlyValidatingElement(element); | @@ -2330,11 +2330,7 @@ if (__DEV__) { | 2330 | 2330 | function setCurrentlyValidatingElement(element) { | 2331 | 2331 | { | 2332 | 2332 | if (element) { | 2333 | | - var owner = element._owner; | 2334 | | - var stack = describeUnknownElementTypeFrameInDEV( | 2335 | | - element.type, | 2336 | | - owner ? owner.type : null | 2337 | | - ); | | 2333 | + var stack = describeUnknownElementTypeFrameInDEV(element.type); | 2338 | 2334 | ReactDebugCurrentFrame.setExtraStackFrame(stack); | 2339 | 2335 | } else { | 2340 | 2336 | ReactDebugCurrentFrame.setExtraStackFrame(null); | |
|