From dae837bc64d1e472f78f56e02fc07e62714ea394 Mon Sep 17 00:00:00 2001 From: sebmarkbage Date: Mon, 3 Jun 2024 16:31:47 +0000 Subject: [PATCH] [Fiber] Prefix owner stacks with the current stack at the console call (#29697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This information is available in the regular stack but since that's hidden behind an expando and our appended stack to logs is not hidden, it hides the most important frames like the name of the current component. This is closer to what happens to the native stack. We only include stacks if they're within a ReactFiberCallUserSpace call frame. This should be most that have a current fiber but this is critical to filtering out most React frames if the regular node_modules filter doesn't work. Most React warnings fire during the rendering phase and not inside a user space function but some do like hooks warnings and setState in render. This feature is more important if we port this to React DevTools appending stacks to all logs where it's likely to originate from inside a component and you want the line within that component to immediately part of the visible stack. One thing that kind sucks is that we don't have a reliable way to exclude React internal stack frames. We filter node_modules but it might not match. For other cases I try hard to only track the stack frame at the root of React (e.g. immediately inside createElement) until the ReactFiberCallUserSpace so we don't need the filtering to work. In this case it's hard to achieve the same thing though. This is easier in RDT because we have the start/end line and parsing of stack traces so we can use that to exclude internals but that's a lot of code/complexity for shipping within the library. For example in Safari: Screenshot 2024-05-31 at 6 15 27 PM Ideally warnOnUseFormStateInDev and useFormState wouldn't be included since they're React internals. Before this change, the Counter.js line also wasn't included though which points to exactly where the error is within the user code. (Note Server Components have V8 formatted lines and Client Components have JSC formatted lines.) DiffTrain build for [4dcdf21325028d7ae9bb3c2172dbbe9647a744ac](https://github.com/facebook/react/commit/4dcdf21325028d7ae9bb3c2172dbbe9647a744ac) --- .../facebook-www/JSXDEVRuntime-dev.classic.js | 6 ++-- .../facebook-www/JSXDEVRuntime-dev.modern.js | 6 ++-- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/REVISION_TRANSFORMS | 2 +- compiled/facebook-www/React-dev.classic.js | 10 +++--- compiled/facebook-www/React-dev.modern.js | 10 +++--- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- .../facebook-www/React-profiling.classic.js | 2 +- .../facebook-www/React-profiling.modern.js | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 34 ++++++++++++------- compiled/facebook-www/ReactART-dev.modern.js | 34 ++++++++++++------- .../facebook-www/ReactART-prod.classic.js | 4 +-- compiled/facebook-www/ReactART-prod.modern.js | 4 +-- .../facebook-www/ReactCacheOld-dev.classic.js | 6 ++-- .../facebook-www/ReactCacheOld-dev.modern.js | 6 ++-- compiled/facebook-www/ReactDOM-dev.classic.js | 34 ++++++++++++------- compiled/facebook-www/ReactDOM-dev.modern.js | 34 ++++++++++++------- .../facebook-www/ReactDOM-prod.classic.js | 10 +++--- compiled/facebook-www/ReactDOM-prod.modern.js | 10 +++--- .../ReactDOM-profiling.classic.js | 10 +++--- .../facebook-www/ReactDOM-profiling.modern.js | 10 +++--- .../ReactDOMServer-dev.classic.js | 10 +++--- .../facebook-www/ReactDOMServer-dev.modern.js | 10 +++--- .../ReactDOMServer-prod.classic.js | 2 +- .../ReactDOMServer-prod.modern.js | 2 +- .../ReactDOMServerStreaming-dev.modern.js | 8 ++--- .../ReactDOMTesting-dev.classic.js | 34 ++++++++++++------- .../ReactDOMTesting-dev.modern.js | 34 ++++++++++++------- .../ReactDOMTesting-prod.classic.js | 10 +++--- .../ReactDOMTesting-prod.modern.js | 10 +++--- .../ReactReconciler-dev.classic.js | 34 ++++++++++++------- .../ReactReconciler-dev.modern.js | 34 ++++++++++++------- .../ReactReconciler-prod.classic.js | 2 +- .../ReactReconciler-prod.modern.js | 2 +- .../ReactTestRenderer-dev.classic.js | 34 ++++++++++++------- .../ReactTestRenderer-dev.modern.js | 34 ++++++++++++------- compiled/facebook-www/VERSION_CLASSIC | 2 +- compiled/facebook-www/VERSION_MODERN | 2 +- 39 files changed, 302 insertions(+), 202 deletions(-) diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js index 17e94cbb16..f94303fff1 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js @@ -80,19 +80,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js index 74d1191f70..7c7245c737 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js @@ -80,19 +80,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index ab8686f206..eebb08f7af 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -9598c41a20162c8a9d57ccf6a356aa183b00b61a +4dcdf21325028d7ae9bb3c2172dbbe9647a744ac diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index ab8686f206..eebb08f7af 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -9598c41a20162c8a9d57ccf6a356aa183b00b61a +4dcdf21325028d7ae9bb3c2172dbbe9647a744ac diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 03e8244c1a..20e87fb8d6 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -22,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } -var ReactVersion = '19.0.0-www-classic-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-classic-4dcdf21325-20240603'; // Re-export dynamic flags from the www version. var dynamicFeatureFlags = require('ReactFeatureFlags'); @@ -87,7 +87,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -98,19 +98,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 1f3f9fcfff..d45c1b7dad 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -22,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } -var ReactVersion = '19.0.0-www-modern-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-modern-4dcdf21325-20240603'; // Re-export dynamic flags from the www version. var dynamicFeatureFlags = require('ReactFeatureFlags'); @@ -87,7 +87,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -98,19 +98,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 37871751d4..714cb304df 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -684,4 +684,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-9598c41a20-20240603"; +exports.version = "19.0.0-www-classic-4dcdf21325-20240603"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 8c87ad65ad..36e5e4040b 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -684,4 +684,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-9598c41a20-20240603"; +exports.version = "19.0.0-www-modern-4dcdf21325-20240603"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index d7e3de7f7a..07c14dfe88 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -688,7 +688,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-9598c41a20-20240603"; +exports.version = "19.0.0-www-classic-4dcdf21325-20240603"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 58e57a0a8d..acdb2c9bce 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -688,7 +688,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-9598c41a20-20240603"; +exports.version = "19.0.0-www-modern-4dcdf21325-20240603"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 21df598584..19a0e28c9e 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -60,7 +60,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = '19.0.0-www-classic-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-classic-4dcdf21325-20240603'; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -81,7 +81,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -92,19 +92,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -1007,18 +1007,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1110,7 +1120,7 @@ function getCurrentFiberOwnerNameInDevOrNull() { return null; } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 2da1ea9baf..64f6905e3b 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -60,7 +60,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = '19.0.0-www-modern-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-modern-4dcdf21325-20240603'; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -81,7 +81,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -92,19 +92,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -1009,18 +1009,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1112,7 +1122,7 @@ function getCurrentFiberOwnerNameInDevOrNull() { return null; } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index dc9afc69bb..556e4a80e2 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -10678,7 +10678,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "19.0.0-www-classic-9598c41a20-20240603", + version: "19.0.0-www-classic-4dcdf21325-20240603", rendererPackageName: "react-art" }; var internals$jscomp$inline_1371 = { @@ -10709,7 +10709,7 @@ var internals$jscomp$inline_1371 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-classic-4dcdf21325-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1372 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 8b53b1dde4..91537f381c 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -10153,7 +10153,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "19.0.0-www-modern-9598c41a20-20240603", + version: "19.0.0-www-modern-4dcdf21325-20240603", rendererPackageName: "react-art" }; var internals$jscomp$inline_1357 = { @@ -10184,7 +10184,7 @@ var internals$jscomp$inline_1357 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-modern-4dcdf21325-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1358 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactCacheOld-dev.classic.js b/compiled/facebook-www/ReactCacheOld-dev.classic.js index 4a31386dde..5246bcb6af 100644 --- a/compiled/facebook-www/ReactCacheOld-dev.classic.js +++ b/compiled/facebook-www/ReactCacheOld-dev.classic.js @@ -28,19 +28,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/ReactCacheOld-dev.modern.js b/compiled/facebook-www/ReactCacheOld-dev.modern.js index 4a31386dde..5246bcb6af 100644 --- a/compiled/facebook-www/ReactCacheOld-dev.modern.js +++ b/compiled/facebook-www/ReactCacheOld-dev.modern.js @@ -28,19 +28,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index f7dab28173..a275eb4940 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -43,7 +43,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -54,19 +54,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -974,18 +974,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1087,7 +1097,7 @@ function getCurrentParentStackInDev() { } } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; @@ -31165,7 +31175,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-classic-4dcdf21325-20240603'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index ee1abd87b0..2f3886349e 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -43,7 +43,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -54,19 +54,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -973,18 +973,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1086,7 +1096,7 @@ function getCurrentParentStackInDev() { } } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; @@ -30342,7 +30352,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-modern-4dcdf21325-20240603'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index f30ad0eae4..cba1085887 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -17085,14 +17085,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1754 = React.version; if ( - "19.0.0-www-classic-9598c41a20-20240603" !== + "19.0.0-www-classic-4dcdf21325-20240603" !== isomorphicReactPackageVersion$jscomp$inline_1754 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1754, - "19.0.0-www-classic-9598c41a20-20240603" + "19.0.0-www-classic-4dcdf21325-20240603" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17111,7 +17111,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1761 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-9598c41a20-20240603", + version: "19.0.0-www-classic-4dcdf21325-20240603", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2205 = { @@ -17141,7 +17141,7 @@ var internals$jscomp$inline_2205 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-classic-4dcdf21325-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2206 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17645,4 +17645,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-9598c41a20-20240603"; +exports.version = "19.0.0-www-classic-4dcdf21325-20240603"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 79505a8cc4..a0e6f2aa0a 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -16448,14 +16448,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1725 = React.version; if ( - "19.0.0-www-modern-9598c41a20-20240603" !== + "19.0.0-www-modern-4dcdf21325-20240603" !== isomorphicReactPackageVersion$jscomp$inline_1725 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1725, - "19.0.0-www-modern-9598c41a20-20240603" + "19.0.0-www-modern-4dcdf21325-20240603" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16474,7 +16474,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1727 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-9598c41a20-20240603", + version: "19.0.0-www-modern-4dcdf21325-20240603", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2196 = { @@ -16504,7 +16504,7 @@ var internals$jscomp$inline_2196 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-modern-4dcdf21325-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2197 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -16878,4 +16878,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-9598c41a20-20240603"; +exports.version = "19.0.0-www-modern-4dcdf21325-20240603"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 61dcdaaa03..6210130275 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -17852,14 +17852,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1841 = React.version; if ( - "19.0.0-www-classic-9598c41a20-20240603" !== + "19.0.0-www-classic-4dcdf21325-20240603" !== isomorphicReactPackageVersion$jscomp$inline_1841 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1841, - "19.0.0-www-classic-9598c41a20-20240603" + "19.0.0-www-classic-4dcdf21325-20240603" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17878,7 +17878,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1848 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-9598c41a20-20240603", + version: "19.0.0-www-classic-4dcdf21325-20240603", rendererPackageName: "react-dom" }; (function (internals) { @@ -17922,7 +17922,7 @@ var devToolsConfig$jscomp$inline_1848 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-classic-4dcdf21325-20240603" }); function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; @@ -18413,7 +18413,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-9598c41a20-20240603"; +exports.version = "19.0.0-www-classic-4dcdf21325-20240603"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index cf4d5d2b55..8cbe855bfe 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -17198,14 +17198,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1812 = React.version; if ( - "19.0.0-www-modern-9598c41a20-20240603" !== + "19.0.0-www-modern-4dcdf21325-20240603" !== isomorphicReactPackageVersion$jscomp$inline_1812 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1812, - "19.0.0-www-modern-9598c41a20-20240603" + "19.0.0-www-modern-4dcdf21325-20240603" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17224,7 +17224,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1814 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-9598c41a20-20240603", + version: "19.0.0-www-modern-4dcdf21325-20240603", rendererPackageName: "react-dom" }; (function (internals) { @@ -17268,7 +17268,7 @@ var devToolsConfig$jscomp$inline_1814 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-modern-4dcdf21325-20240603" }); function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; @@ -17629,7 +17629,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-9598c41a20-20240603"; +exports.version = "19.0.0-www-modern-4dcdf21325-20240603"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index bd9c57ff68..ef17fd3372 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require('react'); var ReactDOM = require('react-dom'); -var ReactVersion = '19.0.0-www-classic-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-classic-4dcdf21325-20240603'; // This refers to a WWW module. var warningWWW = require('warning'); @@ -30,7 +30,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -41,19 +41,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 0edcb1e373..0ffee01977 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require('react'); var ReactDOM = require('react-dom'); -var ReactVersion = '19.0.0-www-modern-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-modern-4dcdf21325-20240603'; // This refers to a WWW module. var warningWWW = require('warning'); @@ -30,7 +30,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -41,19 +41,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 3a8268f47d..55b772d513 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5699,4 +5699,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 = "19.0.0-www-classic-9598c41a20-20240603"; +exports.version = "19.0.0-www-classic-4dcdf21325-20240603"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index dc03d2b748..14c0de2feb 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5677,4 +5677,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 = "19.0.0-www-modern-9598c41a20-20240603"; +exports.version = "19.0.0-www-modern-4dcdf21325-20240603"; diff --git a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js index 3f82ca1ad2..deaeffe7a2 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js @@ -28,7 +28,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -39,19 +39,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 26381db5b9..b2cf67fb79 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -37,7 +37,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -48,19 +48,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -968,18 +968,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1081,7 +1091,7 @@ function getCurrentParentStackInDev() { } } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; @@ -31731,7 +31741,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-classic-4dcdf21325-20240603'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 6e241ba2ca..13e4a7469b 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -37,7 +37,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -48,19 +48,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -967,18 +967,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1080,7 +1090,7 @@ function getCurrentParentStackInDev() { } } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; @@ -30908,7 +30918,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-modern-4dcdf21325-20240603'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 88d7354e6b..ae200b36c1 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -17414,14 +17414,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1784 = React.version; if ( - "19.0.0-www-classic-9598c41a20-20240603" !== + "19.0.0-www-classic-4dcdf21325-20240603" !== isomorphicReactPackageVersion$jscomp$inline_1784 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1784, - "19.0.0-www-classic-9598c41a20-20240603" + "19.0.0-www-classic-4dcdf21325-20240603" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17440,7 +17440,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1791 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-9598c41a20-20240603", + version: "19.0.0-www-classic-4dcdf21325-20240603", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2240 = { @@ -17470,7 +17470,7 @@ var internals$jscomp$inline_2240 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-classic-4dcdf21325-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2241 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -18125,4 +18125,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-9598c41a20-20240603"; +exports.version = "19.0.0-www-classic-4dcdf21325-20240603"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 7bfcaf88a5..5d41bbbcc8 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -16836,14 +16836,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1755 = React.version; if ( - "19.0.0-www-modern-9598c41a20-20240603" !== + "19.0.0-www-modern-4dcdf21325-20240603" !== isomorphicReactPackageVersion$jscomp$inline_1755 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1755, - "19.0.0-www-modern-9598c41a20-20240603" + "19.0.0-www-modern-4dcdf21325-20240603" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16862,7 +16862,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1757 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-9598c41a20-20240603", + version: "19.0.0-www-modern-4dcdf21325-20240603", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2231 = { @@ -16892,7 +16892,7 @@ var internals$jscomp$inline_2231 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-modern-4dcdf21325-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2232 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17417,4 +17417,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-9598c41a20-20240603"; +exports.version = "19.0.0-www-modern-4dcdf21325-20240603"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 254d102ceb..cc730a7d3e 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -36,7 +36,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -47,19 +47,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -968,18 +968,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1071,7 +1081,7 @@ function getCurrentFiberOwnerNameInDevOrNull() { return null; } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; @@ -28933,7 +28943,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-classic-4dcdf21325-20240603'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 9267b3ad62..8338c4a43a 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -36,7 +36,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -47,19 +47,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -970,18 +970,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1073,7 +1083,7 @@ function getCurrentFiberOwnerNameInDevOrNull() { return null; } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; @@ -28201,7 +28211,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-modern-4dcdf21325-20240603'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index 5187f8a579..eda8762d63 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -12665,7 +12665,7 @@ module.exports = function ($$$config) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-classic-4dcdf21325-20240603" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index 1230a652a1..a6c87e644c 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -12178,7 +12178,7 @@ module.exports = function ($$$config) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-9598c41a20-20240603" + reconcilerVersion: "19.0.0-www-modern-4dcdf21325-20240603" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 14e0209b42..0f0ca2453a 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -29,7 +29,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -40,19 +40,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -938,18 +938,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1041,7 +1051,7 @@ function getCurrentFiberOwnerNameInDevOrNull() { return null; } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; @@ -23412,7 +23422,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-classic-4dcdf21325-20240603'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index e55e108acc..0415fb3207 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -29,7 +29,7 @@ function warn(format) { args[_key - 1] = arguments[_key]; } - printWarning('warn', format, args); + printWarning('warn', format, args, new Error('react-stack-top-frame')); } } } @@ -40,19 +40,19 @@ function error(format) { args[_key2 - 1] = arguments[_key2]; } - printWarning('error', format, args); + printWarning('error', format, args, new Error('react-stack-top-frame')); } } } -function printWarning(level, format, args) { +function printWarning(level, format, args, currentStack) { { var React = require('react'); var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null && ReactSharedInternals.getCurrentStack) { - var stack = ReactSharedInternals.getCurrentStack(); + var stack = ReactSharedInternals.getCurrentStack(currentStack); if (stack !== '') { format += '%s'; @@ -938,18 +938,28 @@ function describeFunctionComponentFrame(fn) { /** @noinline */ function callComponentInDEV(Component, props, secondArg) { + var wasRendering = isRendering; setIsRendering(true); - var result = Component(props, secondArg); - setIsRendering(false); - return result; + + try { + var result = Component(props, secondArg); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ function callRenderInDEV(instance) { + var wasRendering = isRendering; setIsRendering(true); - var result = instance.render(); - setIsRendering(false); - return result; + + try { + var result = instance.render(); + return result; + } finally { + setIsRendering(wasRendering); + } } /** @noinline */ @@ -1041,7 +1051,7 @@ function getCurrentFiberOwnerNameInDevOrNull() { return null; } -function getCurrentFiberStackInDev() { +function getCurrentFiberStackInDev(stack) { { if (current === null) { return ''; @@ -23412,7 +23422,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-9598c41a20-20240603'; +var ReactVersion = '19.0.0-www-modern-4dcdf21325-20240603'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index f441ab92e3..ddef1b1dc5 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.0.0-www-classic-9598c41a20-20240603 \ No newline at end of file +19.0.0-www-classic-4dcdf21325-20240603 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 53c2f812b4..8685c18cb9 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.0.0-www-modern-9598c41a20-20240603 \ No newline at end of file +19.0.0-www-modern-4dcdf21325-20240603 \ No newline at end of file