From 1dcb0dfc5220adc876da1bee9d654f8b00a946db Mon Sep 17 00:00:00 2001 From: gnoff Date: Tue, 21 May 2024 23:08:28 +0000 Subject: [PATCH] [Fiber] render boundary in fallback if it contains a new stylesheet during sync update (#28965) Updates Suspensey instances and resources to preload even during urgent updates and to potentially suspend. The current implementation is unchanged for transitions but for sync updates if there is a suspense boundary above the resource/instance it will be rendered in fallback mode instead. Note: This behavior is not what we want for images once we make them suspense enabled. We will need to have forked behavior here to distinguish between stylesheets which should never commit when not loaded and images which should commit after a small delay DiffTrain build for commit https://github.com/facebook/react/commit/217b2ccf160d7594a926d276a75c7312b299be4d. --- .../cjs/ReactTestRenderer-dev.js | 18 ++- .../cjs/ReactTestRenderer-prod.js | 77 ++++++------ .../cjs/ReactTestRenderer-profiling.js | 63 +++++----- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 18 ++- .../implementations/ReactFabric-prod.fb.js | 111 ++++++++++-------- .../ReactFabric-profiling.fb.js | 97 ++++++++------- .../ReactNativeRenderer-dev.fb.js | 20 +++- .../ReactNativeRenderer-prod.fb.js | 111 ++++++++++-------- .../ReactNativeRenderer-profiling.fb.js | 97 ++++++++------- 10 files changed, 346 insertions(+), 268 deletions(-) diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index e2d80180d4..f23c24c3ac 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<286f871bd1498529f1c4a240e3588ad5>> */ 'use strict'; @@ -2212,6 +2212,7 @@ var clearSuspenseBoundaryFromContainer = shim$1; function shim() { throw new Error('The current renderer does not support Resources. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.'); } // Resources (when unsupported) +var preloadResource = shim; var suspendResource = shim; var NO_CONTEXT = {}; @@ -19986,7 +19987,7 @@ function finishConcurrentRender(root, exitStatus, finishedWork, lanes) { function commitRootWhenReady(root, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane) { // TODO: Combine retry throttling with Suspensey commits. Right now they run // one after the other. - if (includesOnlyNonUrgentLanes(lanes)) { + if (finishedWork.subtreeFlags & ShouldSuspendCommit) { // the suspensey resources. The renderer is responsible for accumulating // all the load events. This all happens in a single synchronous // transaction, so it track state in its own module scope. @@ -20790,9 +20791,16 @@ function renderRootConcurrent(root, lanes) { case SuspendedOnInstanceAndReadyToContinue: { + var resource = null; + switch (workInProgress.tag) { - case HostComponent: case HostHoistable: + { + resource = workInProgress.memoizedState; + } + // intentional fallthrough + + case HostComponent: case HostSingleton: { // Before unwinding the stack, check one more time if the @@ -20803,7 +20811,7 @@ function renderRootConcurrent(root, lanes) { var hostFiber = workInProgress; var type = hostFiber.type; var props = hostFiber.pendingProps; - var isReady = preloadInstance(type, props); + var isReady = resource ? preloadResource(resource) : preloadInstance(type, props); if (isReady) { // The data resolved. Resume the work loop as if nothing @@ -23295,7 +23303,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-rc-7be9cfc9'; +var ReactVersion = '19.0.0-rc-d64da7b1'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index 102da2e6c6..65d6c12f50 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -524,6 +524,11 @@ function shim$1() { "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue." ); } +function shim() { + throw Error( + "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." + ); +} var NO_CONTEXT = {}, nodeToInstanceMap = new WeakMap(); function getPublicInstance(inst) { @@ -7364,10 +7369,9 @@ function accumulateSuspenseyCommitOnFiber(fiber) { switch (fiber.tag) { case 26: recursivelyAccumulateSuspenseyCommit(fiber); - if (fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState) - throw Error( - "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." - ); + fiber.flags & suspenseyCommitFlag && + null !== fiber.memoizedState && + shim(); break; case 5: recursivelyAccumulateSuspenseyCommit(fiber); @@ -7774,7 +7778,8 @@ function commitRootWhenReady( lanes, spawnedLane ) { - 0 === (lanes & 42) && accumulateSuspenseyCommitOnFiber(finishedWork); + finishedWork.subtreeFlags & 8192 && + accumulateSuspenseyCommitOnFiber(finishedWork); commitRoot( root, recoverableErrors, @@ -8120,23 +8125,27 @@ function renderRootConcurrent(root, lanes) { throwAndUnwindWorkLoop(root, lanes, thrownValue)); break; case 5: + var resource = null; switch (workInProgress.tag) { - case 5: case 26: + resource = workInProgress.memoizedState; + case 5: case 27: - lanes = workInProgress; - workInProgressSuspendedReason = 0; - workInProgressThrownValue = null; - var sibling = lanes.sibling; - if (null !== sibling) workInProgress = sibling; - else { - var returnFiber = lanes.return; - null !== returnFiber - ? ((workInProgress = returnFiber), - completeUnitOfWork(returnFiber)) - : (workInProgress = null); + var hostFiber = workInProgress; + if (resource ? shim(resource) : 1) { + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + var sibling = hostFiber.sibling; + if (null !== sibling) workInProgress = sibling; + else { + var returnFiber = hostFiber.return; + null !== returnFiber + ? ((workInProgress = returnFiber), + completeUnitOfWork(returnFiber)) + : (workInProgress = null); + } + break b; } - break b; } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; @@ -9286,19 +9295,19 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1037 = { +var devToolsConfig$jscomp$inline_1042 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-rc-34590b32", + version: "19.0.0-rc-f717fc51", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1226 = { - bundleType: devToolsConfig$jscomp$inline_1037.bundleType, - version: devToolsConfig$jscomp$inline_1037.version, - rendererPackageName: devToolsConfig$jscomp$inline_1037.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1037.rendererConfig, +var internals$jscomp$inline_1229 = { + bundleType: devToolsConfig$jscomp$inline_1042.bundleType, + version: devToolsConfig$jscomp$inline_1042.version, + rendererPackageName: devToolsConfig$jscomp$inline_1042.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1042.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9315,26 +9324,26 @@ var internals$jscomp$inline_1226 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1037.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1042.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-34590b32" + reconcilerVersion: "19.0.0-rc-f717fc51" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1230 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1227.isDisabled && - hook$jscomp$inline_1227.supportsFiber + !hook$jscomp$inline_1230.isDisabled && + hook$jscomp$inline_1230.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1227.inject( - internals$jscomp$inline_1226 + (rendererID = hook$jscomp$inline_1230.inject( + internals$jscomp$inline_1229 )), - (injectedHook = hook$jscomp$inline_1227); + (injectedHook = hook$jscomp$inline_1230); } catch (err) {} } exports._Scheduler = Scheduler; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 915f8d5422..929256df44 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7f91dc5049ba1a874cf37d07667c19f3>> + * @generated SignedSource<<55c6c62200803666b583edcc47a6b173>> */ "use strict"; @@ -612,6 +612,11 @@ function shim$1() { "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue." ); } +function shim() { + throw Error( + "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." + ); +} var NO_CONTEXT = {}, nodeToInstanceMap = new WeakMap(); function getPublicInstance(inst) { @@ -7827,10 +7832,9 @@ function accumulateSuspenseyCommitOnFiber(fiber) { switch (fiber.tag) { case 26: recursivelyAccumulateSuspenseyCommit(fiber); - if (fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState) - throw Error( - "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." - ); + fiber.flags & suspenseyCommitFlag && + null !== fiber.memoizedState && + shim(); break; case 5: recursivelyAccumulateSuspenseyCommit(fiber); @@ -8268,7 +8272,8 @@ function commitRootWhenReady( lanes, spawnedLane ) { - 0 === (lanes & 42) && accumulateSuspenseyCommitOnFiber(finishedWork); + finishedWork.subtreeFlags & 8192 && + accumulateSuspenseyCommitOnFiber(finishedWork); commitRoot( root, recoverableErrors, @@ -8648,23 +8653,27 @@ function renderRootConcurrent(root, lanes) { throwAndUnwindWorkLoop(root, lanes, thrownValue)); break; case 5: + var resource = null; switch (workInProgress.tag) { - case 5: case 26: + resource = workInProgress.memoizedState; + case 5: case 27: - lanes = workInProgress; - workInProgressSuspendedReason = 0; - workInProgressThrownValue = null; - var sibling = lanes.sibling; - if (null !== sibling) workInProgress = sibling; - else { - var returnFiber = lanes.return; - null !== returnFiber - ? ((workInProgress = returnFiber), - completeUnitOfWork(returnFiber)) - : (workInProgress = null); + var hostFiber = workInProgress; + if (resource ? shim(resource) : 1) { + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + var sibling = hostFiber.sibling; + if (null !== sibling) workInProgress = sibling; + else { + var returnFiber = hostFiber.return; + null !== returnFiber + ? ((workInProgress = returnFiber), + completeUnitOfWork(returnFiber)) + : (workInProgress = null); + } + break b; } - break b; } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; @@ -9929,12 +9938,12 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1100 = { +var devToolsConfig$jscomp$inline_1105 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-rc-d275a83e", + version: "19.0.0-rc-4fb75363", rendererPackageName: "react-test-renderer" }; (function (internals) { @@ -9951,10 +9960,10 @@ var devToolsConfig$jscomp$inline_1100 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1100.bundleType, - version: devToolsConfig$jscomp$inline_1100.version, - rendererPackageName: devToolsConfig$jscomp$inline_1100.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1100.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1105.bundleType, + version: devToolsConfig$jscomp$inline_1105.version, + rendererPackageName: devToolsConfig$jscomp$inline_1105.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1105.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9971,14 +9980,14 @@ var devToolsConfig$jscomp$inline_1100 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1100.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1105.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-d275a83e" + reconcilerVersion: "19.0.0-rc-4fb75363" }); exports._Scheduler = Scheduler; exports.act = act; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index c499e95fe1..65bd44f344 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -7621466b1b17965032aed24591e9b67fcd926a1b +217b2ccf160d7594a926d276a75c7312b299be4d diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index b07f501974..29db156ce0 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ 'use strict'; @@ -4167,6 +4167,7 @@ var registerSuspenseInstanceRetry = shim$1; function shim() { throw new Error('The current renderer does not support Resources. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.'); } // Resources (when unsupported) +var preloadResource = shim; var suspendResource = shim; var _nativeFabricUIManage = nativeFabricUIManager, @@ -22663,7 +22664,7 @@ function finishConcurrentRender(root, exitStatus, finishedWork, lanes) { function commitRootWhenReady(root, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane) { // TODO: Combine retry throttling with Suspensey commits. Right now they run // one after the other. - if (includesOnlyNonUrgentLanes(lanes)) { + if (finishedWork.subtreeFlags & ShouldSuspendCommit) { // the suspensey resources. The renderer is responsible for accumulating // all the load events. This all happens in a single synchronous // transaction, so it track state in its own module scope. @@ -23487,9 +23488,16 @@ function renderRootConcurrent(root, lanes) { case SuspendedOnInstanceAndReadyToContinue: { + var resource = null; + switch (workInProgress.tag) { - case HostComponent: case HostHoistable: + { + resource = workInProgress.memoizedState; + } + // intentional fallthrough + + case HostComponent: case HostSingleton: { // Before unwinding the stack, check one more time if the @@ -23500,7 +23508,7 @@ function renderRootConcurrent(root, lanes) { var hostFiber = workInProgress; var type = hostFiber.type; var props = hostFiber.pendingProps; - var isReady = preloadInstance(type, props); + var isReady = resource ? preloadResource(resource) : preloadInstance(type, props); if (isReady) { // The data resolved. Resume the work loop as if nothing @@ -26034,7 +26042,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-rc-7ae4ed4c'; +var ReactVersion = '19.0.0-rc-a8857e8e'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 2f3e74f9f4..57b8e38867 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<65b72c4e42cec9cba37885e439426393>> */ "use strict"; @@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_250 = { +var injectedNamesToPlugins$jscomp$inline_252 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_250 = { } } }, - isOrderingDirty$jscomp$inline_251 = !1, - pluginName$jscomp$inline_252; -for (pluginName$jscomp$inline_252 in injectedNamesToPlugins$jscomp$inline_250) + isOrderingDirty$jscomp$inline_253 = !1, + pluginName$jscomp$inline_254; +for (pluginName$jscomp$inline_254 in injectedNamesToPlugins$jscomp$inline_252) if ( - injectedNamesToPlugins$jscomp$inline_250.hasOwnProperty( - pluginName$jscomp$inline_252 + injectedNamesToPlugins$jscomp$inline_252.hasOwnProperty( + pluginName$jscomp$inline_254 ) ) { - var pluginModule$jscomp$inline_253 = - injectedNamesToPlugins$jscomp$inline_250[pluginName$jscomp$inline_252]; + var pluginModule$jscomp$inline_255 = + injectedNamesToPlugins$jscomp$inline_252[pluginName$jscomp$inline_254]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_252) || - namesToPlugins[pluginName$jscomp$inline_252] !== - pluginModule$jscomp$inline_253 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_254) || + namesToPlugins[pluginName$jscomp$inline_254] !== + pluginModule$jscomp$inline_255 ) { - if (namesToPlugins[pluginName$jscomp$inline_252]) + if (namesToPlugins[pluginName$jscomp$inline_254]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_252 + "`.") + (pluginName$jscomp$inline_254 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_252] = - pluginModule$jscomp$inline_253; - isOrderingDirty$jscomp$inline_251 = !0; + namesToPlugins[pluginName$jscomp$inline_254] = + pluginModule$jscomp$inline_255; + isOrderingDirty$jscomp$inline_253 = !0; } } -isOrderingDirty$jscomp$inline_251 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_253 && recomputePluginOrdering(); var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries, consoleManagedByDevToolsDuringStrictMode = dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode, @@ -1565,6 +1565,11 @@ function shim$1() { "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue." ); } +function shim() { + throw Error( + "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." + ); +} var _nativeFabricUIManage = nativeFabricUIManager, createNode = _nativeFabricUIManage.createNode, cloneNodeWithNewChildren = _nativeFabricUIManage.cloneNodeWithNewChildren, @@ -8751,10 +8756,9 @@ function accumulateSuspenseyCommitOnFiber(fiber) { switch (fiber.tag) { case 26: recursivelyAccumulateSuspenseyCommit(fiber); - if (fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState) - throw Error( - "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." - ); + fiber.flags & suspenseyCommitFlag && + null !== fiber.memoizedState && + shim(); break; case 5: recursivelyAccumulateSuspenseyCommit(fiber); @@ -9168,7 +9172,8 @@ function commitRootWhenReady( lanes, spawnedLane ) { - 0 === (lanes & 42) && accumulateSuspenseyCommitOnFiber(finishedWork); + finishedWork.subtreeFlags & 8192 && + accumulateSuspenseyCommitOnFiber(finishedWork); commitRoot( root, recoverableErrors, @@ -9505,23 +9510,27 @@ function renderRootConcurrent(root, lanes) { throwAndUnwindWorkLoop(root, lanes, thrownValue)); break; case 5: + var resource = null; switch (workInProgress.tag) { - case 5: case 26: + resource = workInProgress.memoizedState; + case 5: case 27: - lanes = workInProgress; - workInProgressSuspendedReason = 0; - workInProgressThrownValue = null; - var sibling = lanes.sibling; - if (null !== sibling) workInProgress = sibling; - else { - var returnFiber = lanes.return; - null !== returnFiber - ? ((workInProgress = returnFiber), - completeUnitOfWork(returnFiber)) - : (workInProgress = null); + var hostFiber = workInProgress; + if (resource ? shim(resource) : 1) { + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + var sibling = hostFiber.sibling; + if (null !== sibling) workInProgress = sibling; + else { + var returnFiber = hostFiber.return; + null !== returnFiber + ? ((workInProgress = returnFiber), + completeUnitOfWork(returnFiber)) + : (workInProgress = null); + } + break b; } - break b; } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; @@ -10546,10 +10555,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1114 = { + devToolsConfig$jscomp$inline_1119 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-rc-40a71621", + version: "19.0.0-rc-8d89f616", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10565,11 +10574,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1346 = { - bundleType: devToolsConfig$jscomp$inline_1114.bundleType, - version: devToolsConfig$jscomp$inline_1114.version, - rendererPackageName: devToolsConfig$jscomp$inline_1114.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1114.rendererConfig, +var internals$jscomp$inline_1349 = { + bundleType: devToolsConfig$jscomp$inline_1119.bundleType, + version: devToolsConfig$jscomp$inline_1119.version, + rendererPackageName: devToolsConfig$jscomp$inline_1119.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1119.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10585,26 +10594,26 @@ var internals$jscomp$inline_1346 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1114.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1119.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-40a71621" + reconcilerVersion: "19.0.0-rc-8d89f616" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1347 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1350 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1347.isDisabled && - hook$jscomp$inline_1347.supportsFiber + !hook$jscomp$inline_1350.isDisabled && + hook$jscomp$inline_1350.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1347.inject( - internals$jscomp$inline_1346 + (rendererID = hook$jscomp$inline_1350.inject( + internals$jscomp$inline_1349 )), - (injectedHook = hook$jscomp$inline_1347); + (injectedHook = hook$jscomp$inline_1350); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 65d5468f11..a59704f7a7 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_266 = { +var injectedNamesToPlugins$jscomp$inline_268 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_266 = { } } }, - isOrderingDirty$jscomp$inline_267 = !1, - pluginName$jscomp$inline_268; -for (pluginName$jscomp$inline_268 in injectedNamesToPlugins$jscomp$inline_266) + isOrderingDirty$jscomp$inline_269 = !1, + pluginName$jscomp$inline_270; +for (pluginName$jscomp$inline_270 in injectedNamesToPlugins$jscomp$inline_268) if ( - injectedNamesToPlugins$jscomp$inline_266.hasOwnProperty( - pluginName$jscomp$inline_268 + injectedNamesToPlugins$jscomp$inline_268.hasOwnProperty( + pluginName$jscomp$inline_270 ) ) { - var pluginModule$jscomp$inline_269 = - injectedNamesToPlugins$jscomp$inline_266[pluginName$jscomp$inline_268]; + var pluginModule$jscomp$inline_271 = + injectedNamesToPlugins$jscomp$inline_268[pluginName$jscomp$inline_270]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_268) || - namesToPlugins[pluginName$jscomp$inline_268] !== - pluginModule$jscomp$inline_269 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_270) || + namesToPlugins[pluginName$jscomp$inline_270] !== + pluginModule$jscomp$inline_271 ) { - if (namesToPlugins[pluginName$jscomp$inline_268]) + if (namesToPlugins[pluginName$jscomp$inline_270]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_268 + "`.") + (pluginName$jscomp$inline_270 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_268] = - pluginModule$jscomp$inline_269; - isOrderingDirty$jscomp$inline_267 = !0; + namesToPlugins[pluginName$jscomp$inline_270] = + pluginModule$jscomp$inline_271; + isOrderingDirty$jscomp$inline_269 = !0; } } -isOrderingDirty$jscomp$inline_267 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_269 && recomputePluginOrdering(); var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries, consoleManagedByDevToolsDuringStrictMode = dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode, @@ -1687,6 +1687,11 @@ function shim$1() { "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue." ); } +function shim() { + throw Error( + "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." + ); +} var _nativeFabricUIManage = nativeFabricUIManager, createNode = _nativeFabricUIManage.createNode, cloneNodeWithNewChildren = _nativeFabricUIManage.cloneNodeWithNewChildren, @@ -9259,10 +9264,9 @@ function accumulateSuspenseyCommitOnFiber(fiber) { switch (fiber.tag) { case 26: recursivelyAccumulateSuspenseyCommit(fiber); - if (fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState) - throw Error( - "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." - ); + fiber.flags & suspenseyCommitFlag && + null !== fiber.memoizedState && + shim(); break; case 5: recursivelyAccumulateSuspenseyCommit(fiber); @@ -9698,7 +9702,8 @@ function commitRootWhenReady( lanes, spawnedLane ) { - 0 === (lanes & 42) && accumulateSuspenseyCommitOnFiber(finishedWork); + finishedWork.subtreeFlags & 8192 && + accumulateSuspenseyCommitOnFiber(finishedWork); commitRoot( root, recoverableErrors, @@ -10088,23 +10093,27 @@ function renderRootConcurrent(root, lanes) { throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters)); break; case 5: + var resource = null; switch (workInProgress.tag) { - case 5: case 26: + resource = workInProgress.memoizedState; + case 5: case 27: - lanes = workInProgress; - workInProgressSuspendedReason = 0; - workInProgressThrownValue = null; - var sibling = lanes.sibling; - if (null !== sibling) workInProgress = sibling; - else { - var returnFiber = lanes.return; - null !== returnFiber - ? ((workInProgress = returnFiber), - completeUnitOfWork(returnFiber)) - : (workInProgress = null); + var hostFiber = workInProgress; + if (resource ? shim(resource) : 1) { + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + var sibling = hostFiber.sibling; + if (null !== sibling) workInProgress = sibling; + else { + var returnFiber = hostFiber.return; + null !== returnFiber + ? ((workInProgress = returnFiber), + completeUnitOfWork(returnFiber)) + : (workInProgress = null); + } + break b; } - break b; } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; @@ -11251,10 +11260,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1194 = { + devToolsConfig$jscomp$inline_1199 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-rc-a92b9434", + version: "19.0.0-rc-3594d067", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11284,10 +11293,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1194.bundleType, - version: devToolsConfig$jscomp$inline_1194.version, - rendererPackageName: devToolsConfig$jscomp$inline_1194.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1194.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1199.bundleType, + version: devToolsConfig$jscomp$inline_1199.version, + rendererPackageName: devToolsConfig$jscomp$inline_1199.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1199.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11303,14 +11312,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1194.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1199.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-a92b9434" + reconcilerVersion: "19.0.0-rc-3594d067" }); exports.createPortal = function (children, containerTag) { return createPortal$1( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 56a756d531..6271becb71 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<41909aca302c98b3f31b275cee319e39>> */ 'use strict'; @@ -4954,6 +4954,7 @@ var clearSuspenseBoundaryFromContainer = shim$1; function shim() { throw new Error('The current renderer does not support Resources. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.'); } // Resources (when unsupported) +var preloadResource = shim; var suspendResource = shim; var getViewConfigForType = ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get; // Unused @@ -5249,7 +5250,7 @@ function unhideTextInstance(textInstance, text) { throw new Error('Not yet implemented.'); } function preloadInstance(type, props) { - // Return true to indicate it's already loaded + // Return false to indicate it's already loaded return true; } function waitForCommitToBeReady() { @@ -23013,7 +23014,7 @@ function finishConcurrentRender(root, exitStatus, finishedWork, lanes) { function commitRootWhenReady(root, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane) { // TODO: Combine retry throttling with Suspensey commits. Right now they run // one after the other. - if (includesOnlyNonUrgentLanes(lanes)) { + if (finishedWork.subtreeFlags & ShouldSuspendCommit) { // the suspensey resources. The renderer is responsible for accumulating // all the load events. This all happens in a single synchronous // transaction, so it track state in its own module scope. @@ -23837,9 +23838,16 @@ function renderRootConcurrent(root, lanes) { case SuspendedOnInstanceAndReadyToContinue: { + var resource = null; + switch (workInProgress.tag) { - case HostComponent: case HostHoistable: + { + resource = workInProgress.memoizedState; + } + // intentional fallthrough + + case HostComponent: case HostSingleton: { // Before unwinding the stack, check one more time if the @@ -23850,7 +23858,7 @@ function renderRootConcurrent(root, lanes) { var hostFiber = workInProgress; var type = hostFiber.type; var props = hostFiber.pendingProps; - var isReady = preloadInstance(type, props); + var isReady = resource ? preloadResource(resource) : preloadInstance(type, props); if (isReady) { // The data resolved. Resume the work loop as if nothing @@ -26384,7 +26392,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-rc-4c4395fb'; +var ReactVersion = '19.0.0-rc-a63abc4e'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index eca5993170..43bd14c7a8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<733cad6c24612b99f66a888f11d7a0aa>> */ "use strict"; @@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_258 = { +var injectedNamesToPlugins$jscomp$inline_260 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_258 = { } } }, - isOrderingDirty$jscomp$inline_259 = !1, - pluginName$jscomp$inline_260; -for (pluginName$jscomp$inline_260 in injectedNamesToPlugins$jscomp$inline_258) + isOrderingDirty$jscomp$inline_261 = !1, + pluginName$jscomp$inline_262; +for (pluginName$jscomp$inline_262 in injectedNamesToPlugins$jscomp$inline_260) if ( - injectedNamesToPlugins$jscomp$inline_258.hasOwnProperty( - pluginName$jscomp$inline_260 + injectedNamesToPlugins$jscomp$inline_260.hasOwnProperty( + pluginName$jscomp$inline_262 ) ) { - var pluginModule$jscomp$inline_261 = - injectedNamesToPlugins$jscomp$inline_258[pluginName$jscomp$inline_260]; + var pluginModule$jscomp$inline_263 = + injectedNamesToPlugins$jscomp$inline_260[pluginName$jscomp$inline_262]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_260) || - namesToPlugins[pluginName$jscomp$inline_260] !== - pluginModule$jscomp$inline_261 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_262) || + namesToPlugins[pluginName$jscomp$inline_262] !== + pluginModule$jscomp$inline_263 ) { - if (namesToPlugins[pluginName$jscomp$inline_260]) + if (namesToPlugins[pluginName$jscomp$inline_262]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_260 + "`.") + (pluginName$jscomp$inline_262 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_260] = - pluginModule$jscomp$inline_261; - isOrderingDirty$jscomp$inline_259 = !0; + namesToPlugins[pluginName$jscomp$inline_262] = + pluginModule$jscomp$inline_263; + isOrderingDirty$jscomp$inline_261 = !0; } } -isOrderingDirty$jscomp$inline_259 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_261 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -1910,6 +1910,11 @@ function shim$1() { "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue." ); } +function shim() { + throw Error( + "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." + ); +} var getViewConfigForType = ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get, nextReactTag = 3; @@ -8931,10 +8936,9 @@ function accumulateSuspenseyCommitOnFiber(fiber) { switch (fiber.tag) { case 26: recursivelyAccumulateSuspenseyCommit(fiber); - if (fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState) - throw Error( - "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." - ); + fiber.flags & suspenseyCommitFlag && + null !== fiber.memoizedState && + shim(); break; case 5: recursivelyAccumulateSuspenseyCommit(fiber); @@ -9350,7 +9354,8 @@ function commitRootWhenReady( lanes, spawnedLane ) { - 0 === (lanes & 42) && accumulateSuspenseyCommitOnFiber(finishedWork); + finishedWork.subtreeFlags & 8192 && + accumulateSuspenseyCommitOnFiber(finishedWork); commitRoot( root, recoverableErrors, @@ -9687,23 +9692,27 @@ function renderRootConcurrent(root, lanes) { throwAndUnwindWorkLoop(root, lanes, thrownValue)); break; case 5: + var resource = null; switch (workInProgress.tag) { - case 5: case 26: + resource = workInProgress.memoizedState; + case 5: case 27: - lanes = workInProgress; - workInProgressSuspendedReason = 0; - workInProgressThrownValue = null; - var sibling = lanes.sibling; - if (null !== sibling) workInProgress = sibling; - else { - var returnFiber = lanes.return; - null !== returnFiber - ? ((workInProgress = returnFiber), - completeUnitOfWork(returnFiber)) - : (workInProgress = null); + var hostFiber = workInProgress; + if (resource ? shim(resource) : 1) { + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + var sibling = hostFiber.sibling; + if (null !== sibling) workInProgress = sibling; + else { + var returnFiber = hostFiber.return; + null !== returnFiber + ? ((workInProgress = returnFiber), + completeUnitOfWork(returnFiber)) + : (workInProgress = null); + } + break b; } - break b; } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; @@ -10735,10 +10744,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1182 = { + devToolsConfig$jscomp$inline_1187 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-rc-701bd3df", + version: "19.0.0-rc-f0eeab6c", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10754,11 +10763,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1431 = { - bundleType: devToolsConfig$jscomp$inline_1182.bundleType, - version: devToolsConfig$jscomp$inline_1182.version, - rendererPackageName: devToolsConfig$jscomp$inline_1182.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1182.rendererConfig, +var internals$jscomp$inline_1434 = { + bundleType: devToolsConfig$jscomp$inline_1187.bundleType, + version: devToolsConfig$jscomp$inline_1187.version, + rendererPackageName: devToolsConfig$jscomp$inline_1187.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1187.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10774,26 +10783,26 @@ var internals$jscomp$inline_1431 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1182.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1187.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-701bd3df" + reconcilerVersion: "19.0.0-rc-f0eeab6c" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1432 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1435 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1432.isDisabled && - hook$jscomp$inline_1432.supportsFiber + !hook$jscomp$inline_1435.isDisabled && + hook$jscomp$inline_1435.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1432.inject( - internals$jscomp$inline_1431 + (rendererID = hook$jscomp$inline_1435.inject( + internals$jscomp$inline_1434 )), - (injectedHook = hook$jscomp$inline_1432); + (injectedHook = hook$jscomp$inline_1435); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index bfff740f15..408e0afeab 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9ae22f6743741ff043022da819bd073c>> + * @generated SignedSource<<415326cd3925711de700d738458faf6c>> */ "use strict"; @@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_274 = { +var injectedNamesToPlugins$jscomp$inline_276 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_274 = { } } }, - isOrderingDirty$jscomp$inline_275 = !1, - pluginName$jscomp$inline_276; -for (pluginName$jscomp$inline_276 in injectedNamesToPlugins$jscomp$inline_274) + isOrderingDirty$jscomp$inline_277 = !1, + pluginName$jscomp$inline_278; +for (pluginName$jscomp$inline_278 in injectedNamesToPlugins$jscomp$inline_276) if ( - injectedNamesToPlugins$jscomp$inline_274.hasOwnProperty( - pluginName$jscomp$inline_276 + injectedNamesToPlugins$jscomp$inline_276.hasOwnProperty( + pluginName$jscomp$inline_278 ) ) { - var pluginModule$jscomp$inline_277 = - injectedNamesToPlugins$jscomp$inline_274[pluginName$jscomp$inline_276]; + var pluginModule$jscomp$inline_279 = + injectedNamesToPlugins$jscomp$inline_276[pluginName$jscomp$inline_278]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_276) || - namesToPlugins[pluginName$jscomp$inline_276] !== - pluginModule$jscomp$inline_277 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_278) || + namesToPlugins[pluginName$jscomp$inline_278] !== + pluginModule$jscomp$inline_279 ) { - if (namesToPlugins[pluginName$jscomp$inline_276]) + if (namesToPlugins[pluginName$jscomp$inline_278]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_276 + "`.") + (pluginName$jscomp$inline_278 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_276] = - pluginModule$jscomp$inline_277; - isOrderingDirty$jscomp$inline_275 = !0; + namesToPlugins[pluginName$jscomp$inline_278] = + pluginModule$jscomp$inline_279; + isOrderingDirty$jscomp$inline_277 = !0; } } -isOrderingDirty$jscomp$inline_275 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_277 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -2032,6 +2032,11 @@ function shim$1() { "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue." ); } +function shim() { + throw Error( + "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." + ); +} var getViewConfigForType = ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get, nextReactTag = 3; @@ -9440,10 +9445,9 @@ function accumulateSuspenseyCommitOnFiber(fiber) { switch (fiber.tag) { case 26: recursivelyAccumulateSuspenseyCommit(fiber); - if (fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState) - throw Error( - "The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue." - ); + fiber.flags & suspenseyCommitFlag && + null !== fiber.memoizedState && + shim(); break; case 5: recursivelyAccumulateSuspenseyCommit(fiber); @@ -9881,7 +9885,8 @@ function commitRootWhenReady( lanes, spawnedLane ) { - 0 === (lanes & 42) && accumulateSuspenseyCommitOnFiber(finishedWork); + finishedWork.subtreeFlags & 8192 && + accumulateSuspenseyCommitOnFiber(finishedWork); commitRoot( root, recoverableErrors, @@ -10271,23 +10276,27 @@ function renderRootConcurrent(root, lanes) { throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters)); break; case 5: + var resource = null; switch (workInProgress.tag) { - case 5: case 26: + resource = workInProgress.memoizedState; + case 5: case 27: - lanes = workInProgress; - workInProgressSuspendedReason = 0; - workInProgressThrownValue = null; - var sibling = lanes.sibling; - if (null !== sibling) workInProgress = sibling; - else { - var returnFiber = lanes.return; - null !== returnFiber - ? ((workInProgress = returnFiber), - completeUnitOfWork(returnFiber)) - : (workInProgress = null); + var hostFiber = workInProgress; + if (resource ? shim(resource) : 1) { + workInProgressSuspendedReason = 0; + workInProgressThrownValue = null; + var sibling = hostFiber.sibling; + if (null !== sibling) workInProgress = sibling; + else { + var returnFiber = hostFiber.return; + null !== returnFiber + ? ((workInProgress = returnFiber), + completeUnitOfWork(returnFiber)) + : (workInProgress = null); + } + break b; } - break b; } workInProgressSuspendedReason = 0; workInProgressThrownValue = null; @@ -11441,10 +11450,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1262 = { + devToolsConfig$jscomp$inline_1267 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-rc-433bdfbc", + version: "19.0.0-rc-be316bc9", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11474,10 +11483,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1262.bundleType, - version: devToolsConfig$jscomp$inline_1262.version, - rendererPackageName: devToolsConfig$jscomp$inline_1262.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1262.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1267.bundleType, + version: devToolsConfig$jscomp$inline_1267.version, + rendererPackageName: devToolsConfig$jscomp$inline_1267.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1267.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11493,14 +11502,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1262.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1267.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-433bdfbc" + reconcilerVersion: "19.0.0-rc-be316bc9" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {