From 904602b276be226a4955d026306f9e8b02696645 Mon Sep 17 00:00:00 2001 From: sebmarkbage Date: Sat, 30 Mar 2024 15:13:53 +0000 Subject: [PATCH] Include regular stack trace in serialized errors from Fizz (#28684) We previously only included the component stack. Cleaned up the fields in Fizz server that wasn't using consistent hidden classes in dev vs prod. Added a prefix to errors serialized from server rendering. It can be a bit confusing to see where this error came from otherwise since it didn't come from elsewhere on the client. It's really kind of confusing with other recoverable errors that happen on the client too. DiffTrain build for [b9149cc6e6442389accf1f7c34a77ba2e6e52b5e](https://github.com/facebook/react/commit/b9149cc6e6442389accf1f7c34a77ba2e6e52b5e) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 18 +- compiled/facebook-www/ReactART-dev.modern.js | 18 +- .../facebook-www/ReactART-prod.classic.js | 5 +- compiled/facebook-www/ReactART-prod.modern.js | 5 +- compiled/facebook-www/ReactDOM-dev.classic.js | 24 +- compiled/facebook-www/ReactDOM-dev.modern.js | 24 +- .../facebook-www/ReactDOM-prod.classic.js | 7 +- compiled/facebook-www/ReactDOM-prod.modern.js | 7 +- .../ReactDOM-profiling.classic.js | 7 +- .../facebook-www/ReactDOM-profiling.modern.js | 7 +- .../ReactDOMServer-dev.classic.js | 217 ++++++++++++------ .../facebook-www/ReactDOMServer-dev.modern.js | 217 ++++++++++++------ .../ReactDOMServer-prod.classic.js | 100 +++----- .../ReactDOMServer-prod.modern.js | 100 +++----- .../ReactDOMServerStreaming-dev.modern.js | 213 +++++++++++------ .../ReactDOMServerStreaming-prod.modern.js | 58 ++--- .../ReactDOMTesting-dev.classic.js | 24 +- .../ReactDOMTesting-dev.modern.js | 24 +- .../ReactDOMTesting-prod.classic.js | 7 +- .../ReactDOMTesting-prod.modern.js | 7 +- .../ReactTestRenderer-dev.classic.js | 18 +- .../ReactTestRenderer-dev.modern.js | 18 +- .../unstable_server-external-runtime.js | 12 +- 24 files changed, 671 insertions(+), 468 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index f7d03a3bfd484..9d93b7c4f323d 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -5d4b7587da52dd81bc5c366b909c4511e2970cd1 +b9149cc6e6442389accf1f7c34a77ba2e6e52b5e diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index edcd8fcb77c0b..7c05b6b4ef7b9 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "19.0.0-www-classic-b8b7775c"; + var ReactVersion = "19.0.0-www-classic-3ce339ba"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -17563,7 +17563,7 @@ if (__DEV__) { // get an update and we'll never be able to hydrate the final content. Let's just try the // client side render instead. var digest; - var message, stack; + var message, stack, componentStack; { var _getSuspenseInstanceF = @@ -17572,6 +17572,7 @@ if (__DEV__) { digest = _getSuspenseInstanceF.digest; message = _getSuspenseInstanceF.message; stack = _getSuspenseInstanceF.stack; + componentStack = _getSuspenseInstanceF.componentStack; } var capturedValue = null; // TODO: Figure out a better signal than encoding a magic digest value. @@ -17585,13 +17586,18 @@ if (__DEV__) { } else { error = new Error( "The server could not finish this Suspense boundary, likely " + - "due to an error during server rendering. Switched to " + - "client rendering." + "due to an error during server rendering. " + + "Switched to client rendering." ); - } + } // Replace the stack with the server stack + error.stack = stack || ""; error.digest = digest; - capturedValue = createCapturedValueFromError(error, digest, stack); + capturedValue = createCapturedValueFromError( + error, + digest, + componentStack + ); } return retrySuspenseComponentWithoutHydrating( diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 93257830e4af6..f505d0b5f58f8 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "19.0.0-www-modern-c4adbf64"; + var ReactVersion = "19.0.0-www-modern-78997ebd"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -17257,7 +17257,7 @@ if (__DEV__) { // get an update and we'll never be able to hydrate the final content. Let's just try the // client side render instead. var digest; - var message, stack; + var message, stack, componentStack; { var _getSuspenseInstanceF = @@ -17266,6 +17266,7 @@ if (__DEV__) { digest = _getSuspenseInstanceF.digest; message = _getSuspenseInstanceF.message; stack = _getSuspenseInstanceF.stack; + componentStack = _getSuspenseInstanceF.componentStack; } var capturedValue = null; // TODO: Figure out a better signal than encoding a magic digest value. @@ -17279,13 +17280,18 @@ if (__DEV__) { } else { error = new Error( "The server could not finish this Suspense boundary, likely " + - "due to an error during server rendering. Switched to " + - "client rendering." + "due to an error during server rendering. " + + "Switched to client rendering." ); - } + } // Replace the stack with the server stack + error.stack = stack || ""; error.digest = digest; - capturedValue = createCapturedValueFromError(error, digest, stack); + capturedValue = createCapturedValueFromError( + error, + digest, + componentStack + ); } return retrySuspenseComponentWithoutHydrating( diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 1f87f2acba196..2662e725294e6 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -5069,6 +5069,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$2())) (JSCompiler_temp = shim$2().digest), (nextProps = Error(formatProdErrorMessage(419))), + (nextProps.stack = ""), (nextProps.digest = JSCompiler_temp), (JSCompiler_temp = createCapturedValueFromError( nextProps, @@ -10616,7 +10617,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "19.0.0-www-classic-03341623", + version: "19.0.0-www-classic-859a948c", rendererPackageName: "react-art" }; var internals$jscomp$inline_1324 = { @@ -10647,7 +10648,7 @@ var internals$jscomp$inline_1324 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-03341623" + reconcilerVersion: "19.0.0-www-classic-859a948c" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1325 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index bed42e71465e8..312dc97c6b2cb 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -4818,6 +4818,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$2())) (JSCompiler_temp = shim$2().digest), (nextProps = Error(formatProdErrorMessage(419))), + (nextProps.stack = ""), (nextProps.digest = JSCompiler_temp), (JSCompiler_temp = createCapturedValueFromError( nextProps, @@ -10271,7 +10272,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "19.0.0-www-modern-672a54bb", + version: "19.0.0-www-modern-323b75ff", rendererPackageName: "react-art" }; var internals$jscomp$inline_1304 = { @@ -10302,7 +10303,7 @@ var internals$jscomp$inline_1304 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-672a54bb" + reconcilerVersion: "19.0.0-www-modern-323b75ff" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1305 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index c83eb4d914dc6..6427374513b21 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -22604,7 +22604,7 @@ if (__DEV__) { // get an update and we'll never be able to hydrate the final content. Let's just try the // client side render instead. var digest; - var message, stack; + var message, stack, componentStack; { var _getSuspenseInstanceF = @@ -22613,6 +22613,7 @@ if (__DEV__) { digest = _getSuspenseInstanceF.digest; message = _getSuspenseInstanceF.message; stack = _getSuspenseInstanceF.stack; + componentStack = _getSuspenseInstanceF.componentStack; } var capturedValue = null; // TODO: Figure out a better signal than encoding a magic digest value. @@ -22626,13 +22627,18 @@ if (__DEV__) { } else { error = new Error( "The server could not finish this Suspense boundary, likely " + - "due to an error during server rendering. Switched to " + - "client rendering." + "due to an error during server rendering. " + + "Switched to client rendering." ); - } + } // Replace the stack with the server stack + error.stack = stack || ""; error.digest = digest; - capturedValue = createCapturedValueFromError(error, digest, stack); + capturedValue = createCapturedValueFromError( + error, + digest, + componentStack + ); } return retrySuspenseComponentWithoutHydrating( @@ -36358,7 +36364,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-7d681296"; + var ReactVersion = "19.0.0-www-classic-02ab69c6"; function createPortal$1( children, @@ -45317,7 +45323,7 @@ if (__DEV__) { } function getSuspenseInstanceFallbackErrorDetails(instance) { var dataset = instance.nextSibling && instance.nextSibling.dataset; - var digest, message, stack; + var digest, message, stack, componentStack; if (dataset) { digest = dataset.dgst; @@ -45325,6 +45331,7 @@ if (__DEV__) { { message = dataset.msg; stack = dataset.stck; + componentStack = dataset.cstck; } } @@ -45332,7 +45339,8 @@ if (__DEV__) { return { message: message, digest: digest, - stack: stack + stack: stack, + componentStack: componentStack }; } } diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index f67ea68c1b28d..1a48b308f28c0 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -22496,7 +22496,7 @@ if (__DEV__) { // get an update and we'll never be able to hydrate the final content. Let's just try the // client side render instead. var digest; - var message, stack; + var message, stack, componentStack; { var _getSuspenseInstanceF = @@ -22505,6 +22505,7 @@ if (__DEV__) { digest = _getSuspenseInstanceF.digest; message = _getSuspenseInstanceF.message; stack = _getSuspenseInstanceF.stack; + componentStack = _getSuspenseInstanceF.componentStack; } var capturedValue = null; // TODO: Figure out a better signal than encoding a magic digest value. @@ -22518,13 +22519,18 @@ if (__DEV__) { } else { error = new Error( "The server could not finish this Suspense boundary, likely " + - "due to an error during server rendering. Switched to " + - "client rendering." + "due to an error during server rendering. " + + "Switched to client rendering." ); - } + } // Replace the stack with the server stack + error.stack = stack || ""; error.digest = digest; - capturedValue = createCapturedValueFromError(error, digest, stack); + capturedValue = createCapturedValueFromError( + error, + digest, + componentStack + ); } return retrySuspenseComponentWithoutHydrating( @@ -36206,7 +36212,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-439124ba"; + var ReactVersion = "19.0.0-www-modern-d6e2d0b4"; function createPortal$1( children, @@ -46015,7 +46021,7 @@ if (__DEV__) { } function getSuspenseInstanceFallbackErrorDetails(instance) { var dataset = instance.nextSibling && instance.nextSibling.dataset; - var digest, message, stack; + var digest, message, stack, componentStack; if (dataset) { digest = dataset.dgst; @@ -46023,6 +46029,7 @@ if (__DEV__) { { message = dataset.msg; stack = dataset.stck; + componentStack = dataset.cstck; } } @@ -46030,7 +46037,8 @@ if (__DEV__) { return { message: message, digest: digest, - stack: stack + stack: stack, + componentStack: componentStack }; } } diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index f2acd2c33fed6..b3f219a04ff4f 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -6063,6 +6063,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; JSCompiler_temp = digest; nextProps = Error(formatProdErrorMessage(419)); + nextProps.stack = ""; nextProps.digest = JSCompiler_temp; JSCompiler_temp = createCapturedValueFromError( nextProps, @@ -17107,7 +17108,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1732 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-b1be4296", + version: "19.0.0-www-classic-540c4c3d", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2160 = { @@ -17137,7 +17138,7 @@ var internals$jscomp$inline_2160 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-b1be4296" + reconcilerVersion: "19.0.0-www-classic-540c4c3d" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2161 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17587,4 +17588,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-b1be4296"; +exports.version = "19.0.0-www-classic-540c4c3d"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index a1b909508459a..e5d41c41134d2 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -5915,6 +5915,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; JSCompiler_temp = digest; nextProps = Error(formatProdErrorMessage(419)); + nextProps.stack = ""; nextProps.digest = JSCompiler_temp; JSCompiler_temp = createCapturedValueFromError( nextProps, @@ -16621,7 +16622,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1693 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-44929488", + version: "19.0.0-www-modern-04f7fd59", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2122 = { @@ -16651,7 +16652,7 @@ var internals$jscomp$inline_2122 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-44929488" + reconcilerVersion: "19.0.0-www-modern-04f7fd59" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2123 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -16954,4 +16955,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-44929488"; +exports.version = "19.0.0-www-modern-04f7fd59"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index d18b520800a5e..1a20f45589e3c 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -6285,6 +6285,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; JSCompiler_temp = digest; nextProps = Error(formatProdErrorMessage(419)); + nextProps.stack = ""; nextProps.digest = JSCompiler_temp; JSCompiler_temp = createCapturedValueFromError( nextProps, @@ -17857,7 +17858,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1818 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-329e17e1", + version: "19.0.0-www-classic-25c06000", rendererPackageName: "react-dom" }; (function (internals) { @@ -17901,7 +17902,7 @@ var devToolsConfig$jscomp$inline_1818 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-329e17e1" + reconcilerVersion: "19.0.0-www-classic-25c06000" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -18338,7 +18339,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-329e17e1"; +exports.version = "19.0.0-www-classic-25c06000"; "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 170edaaf79ce8..5fa47fb7df95d 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -6131,6 +6131,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; JSCompiler_temp = digest; nextProps = Error(formatProdErrorMessage(419)); + nextProps.stack = ""; nextProps.digest = JSCompiler_temp; JSCompiler_temp = createCapturedValueFromError( nextProps, @@ -17365,7 +17366,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1779 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-e6f7faa5", + version: "19.0.0-www-modern-e7e67b6b", rendererPackageName: "react-dom" }; (function (internals) { @@ -17409,7 +17410,7 @@ var devToolsConfig$jscomp$inline_1779 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-e6f7faa5" + reconcilerVersion: "19.0.0-www-modern-e7e67b6b" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17699,7 +17700,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-e6f7faa5"; +exports.version = "19.0.0-www-modern-e7e67b6b"; "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 bdd0d64636add..70fcb923415be 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-4615f507"; + var ReactVersion = "19.0.0-www-classic-8ae78134"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -2331,7 +2331,7 @@ if (__DEV__) { // The build script is at scripts/rollup/generate-inline-fizz-runtime.js. // Run `yarn generate-inline-fizz-runtime` to generate. var clientRenderBoundary = - '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; + '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'; var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; var completeBoundaryWithStyles = @@ -6069,6 +6069,8 @@ if (__DEV__) { stringToPrecomputedChunk(' data-msg="'); var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); + var clientRenderedSuspenseBoundaryError1D = + stringToPrecomputedChunk(' data-cstck="'); var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk(">"); function writeStartCompletedSuspenseBoundary$1(destination, renderState) { @@ -6091,7 +6093,8 @@ if (__DEV__) { destination, renderState, errorDigest, - errorMesssage, + errorMessage, + errorStack, errorComponentStack ) { var result; @@ -6114,11 +6117,11 @@ if (__DEV__) { } { - if (errorMesssage) { + if (errorMessage) { writeChunk(destination, clientRenderedSuspenseBoundaryError1B); writeChunk( destination, - stringToChunk(escapeTextForBrowser(errorMesssage)) + stringToChunk(escapeTextForBrowser(errorMessage)) ); writeChunk( destination, @@ -6126,8 +6129,20 @@ if (__DEV__) { ); } - if (errorComponentStack) { + if (errorStack) { writeChunk(destination, clientRenderedSuspenseBoundaryError1C); + writeChunk( + destination, + stringToChunk(escapeTextForBrowser(errorStack)) + ); + writeChunk( + destination, + clientRenderedSuspenseBoundaryErrorAttrInterstitial + ); + } + + if (errorComponentStack) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1D); writeChunk( destination, stringToChunk(escapeTextForBrowser(errorComponentStack)) @@ -6483,6 +6498,7 @@ if (__DEV__) { var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); + var clientRenderData5 = stringToPrecomputedChunk('" data-cstck="'); var clientRenderDataEnd = dataElementQuotedEnd; function writeClientRenderBoundaryInstruction( destination, @@ -6491,6 +6507,7 @@ if (__DEV__) { id, errorDigest, errorMessage, + errorStack, errorComponentStack ) { var scriptFormat = @@ -6524,7 +6541,7 @@ if (__DEV__) { writeChunk(destination, clientRenderScript1A); } - if (errorDigest || errorMessage || errorComponentStack) { + if (errorDigest || errorMessage || errorStack || errorComponentStack) { if (scriptFormat) { // ,"JSONString" writeChunk(destination, clientRenderErrorScriptArgInterstitial); @@ -6544,7 +6561,7 @@ if (__DEV__) { } } - if (errorMessage || errorComponentStack) { + if (errorMessage || errorStack || errorComponentStack) { if (scriptFormat) { // ,"JSONString" writeChunk(destination, clientRenderErrorScriptArgInterstitial); @@ -6564,19 +6581,39 @@ if (__DEV__) { } } - if (errorComponentStack) { + if (errorStack || errorComponentStack) { // ,"JSONString" if (scriptFormat) { writeChunk(destination, clientRenderErrorScriptArgInterstitial); writeChunk( destination, stringToChunk( - escapeJSStringsForInstructionScripts(errorComponentStack) + escapeJSStringsForInstructionScripts(errorStack || "") ) ); } else { // " data-stck="HTMLString writeChunk(destination, clientRenderData4); + writeChunk( + destination, + stringToChunk(escapeTextForBrowser(errorStack || "")) + ); + } + } + + if (errorComponentStack) { + // ,"JSONString" + if (scriptFormat) { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk( + destination, + stringToChunk( + escapeJSStringsForInstructionScripts(errorComponentStack) + ) + ); + } else { + // " data-cstck="HTMLString + writeChunk(destination, clientRenderData5); writeChunk( destination, stringToChunk(escapeTextForBrowser(errorComponentStack)) @@ -8500,6 +8537,7 @@ if (__DEV__) { renderState, // flushing these error arguments are not currently supported in this legacy streaming format. errorDigest, errorMessage, + errorStack, errorComponentStack ) { if (renderState.generateStaticMarkup) { @@ -8513,6 +8551,7 @@ if (__DEV__) { renderState, errorDigest, errorMessage, + errorStack, errorComponentStack ); } @@ -11272,7 +11311,7 @@ if (__DEV__) { } function createSuspenseBoundary(request, fallbackAbortableTasks) { - return { + var boundary = { status: PENDING, rootSegmentID: -1, parentFlushed: false, @@ -11286,6 +11325,15 @@ if (__DEV__) { trackedContentKeyPath: null, trackedFallbackNode: null }; + + { + // DEV-only fields for hidden class + boundary.errorMessage = null; + boundary.errorStack = null; + boundary.errorComponentStack = null; + } + + return boundary; } function createRenderTask( @@ -11469,23 +11517,37 @@ if (__DEV__) { } } - function encodeErrorForBoundary(boundary, digest, error, thrownInfo) { + function encodeErrorForBoundary( + boundary, + digest, + error, + thrownInfo, + wasAborted + ) { boundary.errorDigest = digest; { - var message; // In dev we additionally encode the error message and component stack on the boundary + var message, stack; // In dev we additionally encode the error message and component stack on the boundary if (error instanceof Error) { // eslint-disable-next-line react-internal/safe-string-coercion - message = String(error.message); + message = String(error.message); // eslint-disable-next-line react-internal/safe-string-coercion + + stack = String(error.stack); } else if (typeof error === "object" && error !== null) { message = describeObjectForErrorMessage(error); + stack = null; } else { // eslint-disable-next-line react-internal/safe-string-coercion message = String(error); + stack = null; } - boundary.errorMessage = message; + var prefix = wasAborted + ? "Switched to client rendering because the server rendering aborted due to:\n\n" + : "Switched to client rendering because the server rendering errored:\n\n"; + boundary.errorMessage = prefix + message; + boundary.errorStack = stack; boundary.errorComponentStack = thrownInfo.componentStack; } } @@ -11638,7 +11700,13 @@ if (__DEV__) { errorDigest = logRecoverableError(request, error, thrownInfo); } - encodeErrorForBoundary(newBoundary, errorDigest, error, thrownInfo); + encodeErrorForBoundary( + newBoundary, + errorDigest, + error, + thrownInfo, + false + ); untrackBoundary(request, newBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task. // We don't need to schedule any task because we know the parent has written yet. // We do need to fallthrough to create the fallback though. @@ -11772,7 +11840,13 @@ if (__DEV__) { errorDigest = logRecoverableError(request, error, thrownInfo); } - encodeErrorForBoundary(resumedBoundary, errorDigest, error, thrownInfo); + encodeErrorForBoundary( + resumedBoundary, + errorDigest, + error, + thrownInfo, + false + ); task.replay.pendingTasks--; // The parent already flushed in the prerender so we need to schedule this to be emitted. request.clientRenderedBoundaries.push(resumedBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task. @@ -13302,7 +13376,8 @@ if (__DEV__) { resumeSlots, error, errorDigest, - errorInfo + errorInfo, + false ); } @@ -13321,7 +13396,13 @@ if (__DEV__) { if (boundary.status !== CLIENT_RENDERED) { boundary.status = CLIENT_RENDERED; - encodeErrorForBoundary(boundary, errorDigest, error, errorInfo); + encodeErrorForBoundary( + boundary, + errorDigest, + error, + errorInfo, + false + ); untrackBoundary(request, boundary); // Regardless of what happens next, this boundary won't be displayed, // so we can flush it, if the parent already flushed. @@ -13361,31 +13442,20 @@ if (__DEV__) { rootSegmentID, error, errorDigest, - errorInfo + errorInfo, + wasAborted ) { var resumedBoundary = createSuspenseBoundary(request, new Set()); resumedBoundary.parentFlushed = true; // We restore the same id of this boundary as was used during prerender. resumedBoundary.rootSegmentID = rootSegmentID; resumedBoundary.status = CLIENT_RENDERED; - var errorMessage = error; - - { - var errorPrefix = "The server did not finish this Suspense boundary: "; - - if (error && typeof error.message === "string") { - errorMessage = errorPrefix + error.message; - } else { - // eslint-disable-next-line react-internal/safe-string-coercion - errorMessage = errorPrefix + String(error); - } - } - encodeErrorForBoundary( resumedBoundary, errorDigest, - errorMessage, - errorInfo + error, + errorInfo, + wasAborted ); if (resumedBoundary.parentFlushed) { @@ -13400,7 +13470,8 @@ if (__DEV__) { slots, error, errorDigest, - errorInfo + errorInfo, + aborted ) { for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; @@ -13413,7 +13484,8 @@ if (__DEV__) { node[3], error, errorDigest, - errorInfo + errorInfo, + aborted ); } else { var boundaryNode = node; @@ -13423,7 +13495,8 @@ if (__DEV__) { rootSegmentID, error, errorDigest, - errorInfo + errorInfo, + aborted ); } } // Empty the set, since we've cleared it now. @@ -13440,7 +13513,13 @@ if (__DEV__) { ); } else if (boundary.status !== CLIENT_RENDERED) { boundary.status = CLIENT_RENDERED; - encodeErrorForBoundary(boundary, errorDigest, error, errorInfo); + encodeErrorForBoundary( + boundary, + errorDigest, + error, + errorInfo, + aborted + ); if (boundary.parentFlushed) { request.clientRenderedBoundaries.push(boundary); @@ -13500,7 +13579,8 @@ if (__DEV__) { replay.slots, error, errorDigest, - errorInfo + errorInfo, + true ); } @@ -13526,25 +13606,12 @@ if (__DEV__) { _errorDigest = logRecoverableError(request, error, _errorInfo); } - var errorMessage = error; - - { - var errorPrefix = - "The server did not finish this Suspense boundary: "; - - if (error && typeof error.message === "string") { - errorMessage = errorPrefix + error.message; - } else { - // eslint-disable-next-line react-internal/safe-string-coercion - errorMessage = errorPrefix + String(error); - } - } - encodeErrorForBoundary( boundary, _errorDigest, - errorMessage, - _errorInfo + error, + _errorInfo, + true ); untrackBoundary(request, boundary); @@ -14036,13 +14103,16 @@ if (__DEV__) { if (boundary.status === CLIENT_RENDERED) { // Emit a client rendered suspense boundary wrapper. // We never queue the inner boundary so we'll never emit its content or partial segments. - writeStartClientRenderedSuspenseBoundary( - destination, - request.renderState, - boundary.errorDigest, - boundary.errorMessage, - boundary.errorComponentStack - ); // Flush the fallback. + { + writeStartClientRenderedSuspenseBoundary( + destination, + request.renderState, + boundary.errorDigest, + boundary.errorMessage, + boundary.errorStack, + boundary.errorComponentStack + ); + } // Flush the fallback. flushSubtree(request, destination, segment, hoistableState); return writeEndClientRenderedSuspenseBoundary( @@ -14116,15 +14186,18 @@ if (__DEV__) { } function flushClientRenderedBoundary(request, destination, boundary) { - return writeClientRenderBoundaryInstruction( - destination, - request.resumableState, - request.renderState, - boundary.rootSegmentID, - boundary.errorDigest, - boundary.errorMessage, - boundary.errorComponentStack - ); + { + return writeClientRenderBoundaryInstruction( + destination, + request.resumableState, + request.renderState, + boundary.rootSegmentID, + boundary.errorDigest, + boundary.errorMessage, + boundary.errorStack, + boundary.errorComponentStack + ); + } } function flushSegmentContainer( diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index ffa0afa246f2a..437692ece1ce8 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-7f58775d"; + var ReactVersion = "19.0.0-www-modern-de33d561"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -2331,7 +2331,7 @@ if (__DEV__) { // The build script is at scripts/rollup/generate-inline-fizz-runtime.js. // Run `yarn generate-inline-fizz-runtime` to generate. var clientRenderBoundary = - '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; + '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'; var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; var completeBoundaryWithStyles = @@ -6069,6 +6069,8 @@ if (__DEV__) { stringToPrecomputedChunk(' data-msg="'); var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); + var clientRenderedSuspenseBoundaryError1D = + stringToPrecomputedChunk(' data-cstck="'); var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk(">"); function writeStartCompletedSuspenseBoundary$1(destination, renderState) { @@ -6091,7 +6093,8 @@ if (__DEV__) { destination, renderState, errorDigest, - errorMesssage, + errorMessage, + errorStack, errorComponentStack ) { var result; @@ -6114,11 +6117,11 @@ if (__DEV__) { } { - if (errorMesssage) { + if (errorMessage) { writeChunk(destination, clientRenderedSuspenseBoundaryError1B); writeChunk( destination, - stringToChunk(escapeTextForBrowser(errorMesssage)) + stringToChunk(escapeTextForBrowser(errorMessage)) ); writeChunk( destination, @@ -6126,8 +6129,20 @@ if (__DEV__) { ); } - if (errorComponentStack) { + if (errorStack) { writeChunk(destination, clientRenderedSuspenseBoundaryError1C); + writeChunk( + destination, + stringToChunk(escapeTextForBrowser(errorStack)) + ); + writeChunk( + destination, + clientRenderedSuspenseBoundaryErrorAttrInterstitial + ); + } + + if (errorComponentStack) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1D); writeChunk( destination, stringToChunk(escapeTextForBrowser(errorComponentStack)) @@ -6483,6 +6498,7 @@ if (__DEV__) { var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); + var clientRenderData5 = stringToPrecomputedChunk('" data-cstck="'); var clientRenderDataEnd = dataElementQuotedEnd; function writeClientRenderBoundaryInstruction( destination, @@ -6491,6 +6507,7 @@ if (__DEV__) { id, errorDigest, errorMessage, + errorStack, errorComponentStack ) { var scriptFormat = @@ -6524,7 +6541,7 @@ if (__DEV__) { writeChunk(destination, clientRenderScript1A); } - if (errorDigest || errorMessage || errorComponentStack) { + if (errorDigest || errorMessage || errorStack || errorComponentStack) { if (scriptFormat) { // ,"JSONString" writeChunk(destination, clientRenderErrorScriptArgInterstitial); @@ -6544,7 +6561,7 @@ if (__DEV__) { } } - if (errorMessage || errorComponentStack) { + if (errorMessage || errorStack || errorComponentStack) { if (scriptFormat) { // ,"JSONString" writeChunk(destination, clientRenderErrorScriptArgInterstitial); @@ -6564,19 +6581,39 @@ if (__DEV__) { } } - if (errorComponentStack) { + if (errorStack || errorComponentStack) { // ,"JSONString" if (scriptFormat) { writeChunk(destination, clientRenderErrorScriptArgInterstitial); writeChunk( destination, stringToChunk( - escapeJSStringsForInstructionScripts(errorComponentStack) + escapeJSStringsForInstructionScripts(errorStack || "") ) ); } else { // " data-stck="HTMLString writeChunk(destination, clientRenderData4); + writeChunk( + destination, + stringToChunk(escapeTextForBrowser(errorStack || "")) + ); + } + } + + if (errorComponentStack) { + // ,"JSONString" + if (scriptFormat) { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk( + destination, + stringToChunk( + escapeJSStringsForInstructionScripts(errorComponentStack) + ) + ); + } else { + // " data-cstck="HTMLString + writeChunk(destination, clientRenderData5); writeChunk( destination, stringToChunk(escapeTextForBrowser(errorComponentStack)) @@ -8500,6 +8537,7 @@ if (__DEV__) { renderState, // flushing these error arguments are not currently supported in this legacy streaming format. errorDigest, errorMessage, + errorStack, errorComponentStack ) { if (renderState.generateStaticMarkup) { @@ -8513,6 +8551,7 @@ if (__DEV__) { renderState, errorDigest, errorMessage, + errorStack, errorComponentStack ); } @@ -11193,7 +11232,7 @@ if (__DEV__) { } function createSuspenseBoundary(request, fallbackAbortableTasks) { - return { + var boundary = { status: PENDING, rootSegmentID: -1, parentFlushed: false, @@ -11207,6 +11246,15 @@ if (__DEV__) { trackedContentKeyPath: null, trackedFallbackNode: null }; + + { + // DEV-only fields for hidden class + boundary.errorMessage = null; + boundary.errorStack = null; + boundary.errorComponentStack = null; + } + + return boundary; } function createRenderTask( @@ -11390,23 +11438,37 @@ if (__DEV__) { } } - function encodeErrorForBoundary(boundary, digest, error, thrownInfo) { + function encodeErrorForBoundary( + boundary, + digest, + error, + thrownInfo, + wasAborted + ) { boundary.errorDigest = digest; { - var message; // In dev we additionally encode the error message and component stack on the boundary + var message, stack; // In dev we additionally encode the error message and component stack on the boundary if (error instanceof Error) { // eslint-disable-next-line react-internal/safe-string-coercion - message = String(error.message); + message = String(error.message); // eslint-disable-next-line react-internal/safe-string-coercion + + stack = String(error.stack); } else if (typeof error === "object" && error !== null) { message = describeObjectForErrorMessage(error); + stack = null; } else { // eslint-disable-next-line react-internal/safe-string-coercion message = String(error); + stack = null; } - boundary.errorMessage = message; + var prefix = wasAborted + ? "Switched to client rendering because the server rendering aborted due to:\n\n" + : "Switched to client rendering because the server rendering errored:\n\n"; + boundary.errorMessage = prefix + message; + boundary.errorStack = stack; boundary.errorComponentStack = thrownInfo.componentStack; } } @@ -11559,7 +11621,13 @@ if (__DEV__) { errorDigest = logRecoverableError(request, error, thrownInfo); } - encodeErrorForBoundary(newBoundary, errorDigest, error, thrownInfo); + encodeErrorForBoundary( + newBoundary, + errorDigest, + error, + thrownInfo, + false + ); untrackBoundary(request, newBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task. // We don't need to schedule any task because we know the parent has written yet. // We do need to fallthrough to create the fallback though. @@ -11693,7 +11761,13 @@ if (__DEV__) { errorDigest = logRecoverableError(request, error, thrownInfo); } - encodeErrorForBoundary(resumedBoundary, errorDigest, error, thrownInfo); + encodeErrorForBoundary( + resumedBoundary, + errorDigest, + error, + thrownInfo, + false + ); task.replay.pendingTasks--; // The parent already flushed in the prerender so we need to schedule this to be emitted. request.clientRenderedBoundaries.push(resumedBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task. @@ -13211,7 +13285,8 @@ if (__DEV__) { resumeSlots, error, errorDigest, - errorInfo + errorInfo, + false ); } @@ -13230,7 +13305,13 @@ if (__DEV__) { if (boundary.status !== CLIENT_RENDERED) { boundary.status = CLIENT_RENDERED; - encodeErrorForBoundary(boundary, errorDigest, error, errorInfo); + encodeErrorForBoundary( + boundary, + errorDigest, + error, + errorInfo, + false + ); untrackBoundary(request, boundary); // Regardless of what happens next, this boundary won't be displayed, // so we can flush it, if the parent already flushed. @@ -13270,31 +13351,20 @@ if (__DEV__) { rootSegmentID, error, errorDigest, - errorInfo + errorInfo, + wasAborted ) { var resumedBoundary = createSuspenseBoundary(request, new Set()); resumedBoundary.parentFlushed = true; // We restore the same id of this boundary as was used during prerender. resumedBoundary.rootSegmentID = rootSegmentID; resumedBoundary.status = CLIENT_RENDERED; - var errorMessage = error; - - { - var errorPrefix = "The server did not finish this Suspense boundary: "; - - if (error && typeof error.message === "string") { - errorMessage = errorPrefix + error.message; - } else { - // eslint-disable-next-line react-internal/safe-string-coercion - errorMessage = errorPrefix + String(error); - } - } - encodeErrorForBoundary( resumedBoundary, errorDigest, - errorMessage, - errorInfo + error, + errorInfo, + wasAborted ); if (resumedBoundary.parentFlushed) { @@ -13309,7 +13379,8 @@ if (__DEV__) { slots, error, errorDigest, - errorInfo + errorInfo, + aborted ) { for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; @@ -13322,7 +13393,8 @@ if (__DEV__) { node[3], error, errorDigest, - errorInfo + errorInfo, + aborted ); } else { var boundaryNode = node; @@ -13332,7 +13404,8 @@ if (__DEV__) { rootSegmentID, error, errorDigest, - errorInfo + errorInfo, + aborted ); } } // Empty the set, since we've cleared it now. @@ -13349,7 +13422,13 @@ if (__DEV__) { ); } else if (boundary.status !== CLIENT_RENDERED) { boundary.status = CLIENT_RENDERED; - encodeErrorForBoundary(boundary, errorDigest, error, errorInfo); + encodeErrorForBoundary( + boundary, + errorDigest, + error, + errorInfo, + aborted + ); if (boundary.parentFlushed) { request.clientRenderedBoundaries.push(boundary); @@ -13409,7 +13488,8 @@ if (__DEV__) { replay.slots, error, errorDigest, - errorInfo + errorInfo, + true ); } @@ -13435,25 +13515,12 @@ if (__DEV__) { _errorDigest = logRecoverableError(request, error, _errorInfo); } - var errorMessage = error; - - { - var errorPrefix = - "The server did not finish this Suspense boundary: "; - - if (error && typeof error.message === "string") { - errorMessage = errorPrefix + error.message; - } else { - // eslint-disable-next-line react-internal/safe-string-coercion - errorMessage = errorPrefix + String(error); - } - } - encodeErrorForBoundary( boundary, _errorDigest, - errorMessage, - _errorInfo + error, + _errorInfo, + true ); untrackBoundary(request, boundary); @@ -13945,13 +14012,16 @@ if (__DEV__) { if (boundary.status === CLIENT_RENDERED) { // Emit a client rendered suspense boundary wrapper. // We never queue the inner boundary so we'll never emit its content or partial segments. - writeStartClientRenderedSuspenseBoundary( - destination, - request.renderState, - boundary.errorDigest, - boundary.errorMessage, - boundary.errorComponentStack - ); // Flush the fallback. + { + writeStartClientRenderedSuspenseBoundary( + destination, + request.renderState, + boundary.errorDigest, + boundary.errorMessage, + boundary.errorStack, + boundary.errorComponentStack + ); + } // Flush the fallback. flushSubtree(request, destination, segment, hoistableState); return writeEndClientRenderedSuspenseBoundary( @@ -14025,15 +14095,18 @@ if (__DEV__) { } function flushClientRenderedBoundary(request, destination, boundary) { - return writeClientRenderBoundaryInstruction( - destination, - request.resumableState, - request.renderState, - boundary.rootSegmentID, - boundary.errorDigest, - boundary.errorMessage, - boundary.errorComponentStack - ); + { + return writeClientRenderBoundaryInstruction( + destination, + request.resumableState, + request.renderState, + boundary.rootSegmentID, + boundary.errorDigest, + boundary.errorMessage, + boundary.errorStack, + boundary.errorComponentStack + ); + } } function flushSegmentContainer( diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 92813b202304b..02e6a0824d89d 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -2624,16 +2624,16 @@ function createRenderState(resumableState, generateStaticMarkup) { "\x3c/script>" ); bootstrapScriptContent = idPrefix + "P:"; - var JSCompiler_object_inline_segmentPrefix_1596 = idPrefix + "S:"; + var JSCompiler_object_inline_segmentPrefix_1623 = idPrefix + "S:"; idPrefix += "B:"; - var JSCompiler_object_inline_preconnects_1610 = new Set(), - JSCompiler_object_inline_fontPreloads_1611 = new Set(), - JSCompiler_object_inline_highImagePreloads_1612 = new Set(), - JSCompiler_object_inline_styles_1613 = new Map(), - JSCompiler_object_inline_bootstrapScripts_1614 = new Set(), - JSCompiler_object_inline_scripts_1615 = new Set(), - JSCompiler_object_inline_bulkPreloads_1616 = new Set(), - JSCompiler_object_inline_preloads_1617 = { + var JSCompiler_object_inline_preconnects_1637 = new Set(), + JSCompiler_object_inline_fontPreloads_1638 = new Set(), + JSCompiler_object_inline_highImagePreloads_1639 = new Set(), + JSCompiler_object_inline_styles_1640 = new Map(), + JSCompiler_object_inline_bootstrapScripts_1641 = new Set(), + JSCompiler_object_inline_scripts_1642 = new Set(), + JSCompiler_object_inline_bulkPreloads_1643 = new Set(), + JSCompiler_object_inline_preloads_1644 = { images: new Map(), stylesheets: new Map(), scripts: new Map(), @@ -2670,7 +2670,7 @@ function createRenderState(resumableState, generateStaticMarkup) { scriptConfig.moduleScriptResources[href] = null; scriptConfig = []; pushLinkImpl(scriptConfig, props); - JSCompiler_object_inline_bootstrapScripts_1614.add(scriptConfig); + JSCompiler_object_inline_bootstrapScripts_1641.add(scriptConfig); bootstrapChunks.push('