From 79722c7167bf3b5d3e70a1de355fc703ac0efc2d Mon Sep 17 00:00:00 2001 From: gnoff Date: Thu, 6 Jun 2024 17:26:59 +0000 Subject: [PATCH] [Flight] Schedule work in a microtask (#29491) Stacked on #29551 Flight pings much more often than Fizz because async function components will always take at least a microtask to resolve . Rather than scheduling this work as a new macrotask Flight now schedules pings in a microtask. This allows more microtasks to ping before actually doing a work flush but doesn't force the vm to spin up a new task which is quite common give n the nature of Server Components DiffTrain build for commit https://github.com/facebook/react/commit/1e1e5cd25223fddbce0e3fb7889b06df0d93a950. --- compiled-rn/VERSION_NATIVE_FB | 2 +- .../react-test-renderer/cjs/ReactTestRenderer-dev.js | 4 ++-- .../react-test-renderer/cjs/ReactTestRenderer-prod.js | 6 +++--- .../cjs/ReactTestRenderer-profiling.js | 6 +++--- .../js/RKJSModules/vendor/react/react/cjs/React-dev.js | 4 ++-- .../RKJSModules/vendor/react/react/cjs/React-prod.js | 4 ++-- .../vendor/react/react/cjs/React-profiling.js | 4 ++-- .../js/react-native-github/Libraries/Renderer/REVISION | 2 +- .../Renderer/implementations/ReactFabric-dev.fb.js | 4 ++-- .../Renderer/implementations/ReactFabric-prod.fb.js | 6 +++--- .../implementations/ReactFabric-profiling.fb.js | 6 +++--- .../implementations/ReactNativeRenderer-dev.fb.js | 4 ++-- .../implementations/ReactNativeRenderer-prod.fb.js | 10 +++++----- .../ReactNativeRenderer-profiling.fb.js | 10 +++++----- 14 files changed, 36 insertions(+), 36 deletions(-) diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index f1e47c3982..dd387785d0 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.0.0-native-fb-b526a0a419-20240606 \ No newline at end of file +19.0.0-native-fb-1e1e5cd252-20240606 \ No newline at end of file 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 997a6e2cff..7ada283dae 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<> */ 'use strict'; @@ -23580,7 +23580,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-native-fb-b526a0a419-20240606'; +var ReactVersion = '19.0.0-native-fb-1e1e5cd252-20240606'; /* * 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 2f0a4943a4..08724a1d86 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<<071298c9ff96ae03132c2f6189a9505d>> + * @generated SignedSource<> */ "use strict"; @@ -9336,7 +9336,7 @@ var devToolsConfig$jscomp$inline_1048 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-native-fb-b526a0a419-20240606", + version: "19.0.0-native-fb-1e1e5cd252-20240606", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1235 = { @@ -9367,7 +9367,7 @@ var internals$jscomp$inline_1235 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-native-fb-b526a0a419-20240606" + reconcilerVersion: "19.0.0-native-fb-1e1e5cd252-20240606" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1236 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 7f66923a4b..03186b02df 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<<2b7f28997d14368e8b072ffc1497cb77>> + * @generated SignedSource<<7acd955e6808e3be88f1cdc50d2a594b>> */ "use strict"; @@ -9958,7 +9958,7 @@ var devToolsConfig$jscomp$inline_1131 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-native-fb-b526a0a419-20240606", + version: "19.0.0-native-fb-1e1e5cd252-20240606", rendererPackageName: "react-test-renderer" }; (function (internals) { @@ -10002,7 +10002,7 @@ var devToolsConfig$jscomp$inline_1131 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-native-fb-b526a0a419-20240606" + reconcilerVersion: "19.0.0-native-fb-1e1e5cd252-20240606" }); exports._Scheduler = Scheduler; exports.act = act; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index 6100a5f69f..aa832f1475 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<27df3fd4e7100982c8f4ef7d518a4510>> + * @generated SignedSource<<0abf8e5118ea2b56775e8918c72212d7>> */ 'use strict'; @@ -24,7 +24,7 @@ if ( } var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags'); -var ReactVersion = '19.0.0-native-fb-b526a0a419-20240606'; +var ReactVersion = '19.0.0-native-fb-1e1e5cd252-20240606'; // Re-export dynamic flags from the internal module. var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index c86f1dbe1a..b62b78f2d8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<02284763378c01e6ceb319a485aebf4e>> + * @generated SignedSource<<4eb73bc3a903ce23b05b972ddb23974d>> */ "use strict"; @@ -604,4 +604,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-b526a0a419-20240606"; +exports.version = "19.0.0-native-fb-1e1e5cd252-20240606"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index 23cce5aa42..c1fb470013 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<27f9d9eb4116e19c56a7659cf6b57e21>> + * @generated SignedSource<<41b2095c7a60ae87cfed87994d77300a>> */ "use strict"; @@ -608,7 +608,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-b526a0a419-20240606"; +exports.version = "19.0.0-native-fb-1e1e5cd252-20240606"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && 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 edbfee35a0..54cf32a73d 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 @@ -b526a0a419029eea31f4d967951b6feca123012d +1e1e5cd25223fddbce0e3fb7889b06df0d93a950 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 0c5047f469..c6a6c8a318 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<<557c39946498737c4c67c5ed81c7a5e8>> + * @generated SignedSource<<5e256a72a792b00fed5697837d04daca>> */ 'use strict'; @@ -26316,7 +26316,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-rc-b526a0a419-20240606'; +var ReactVersion = '19.0.0-rc-1e1e5cd252-20240606'; /* * 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 8f6427345e..8311aa9142 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<<5d81da86232cf85d0e472d78b33810df>> + * @generated SignedSource<> */ "use strict"; @@ -10591,7 +10591,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1125 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-rc-b526a0a419-20240606", + version: "19.0.0-rc-1e1e5cd252-20240606", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10634,7 +10634,7 @@ var internals$jscomp$inline_1351 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-b526a0a419-20240606" + reconcilerVersion: "19.0.0-rc-1e1e5cd252-20240606" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1352 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 2bbcfa4095..c2a0f317ff 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<<5294159175056cc85cd3eaccc20868b4>> + * @generated SignedSource<<86fa47d8f492032c650dfc992eed398d>> */ "use strict"; @@ -11297,7 +11297,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1206 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-rc-b526a0a419-20240606", + version: "19.0.0-rc-1e1e5cd252-20240606", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11353,7 +11353,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-b526a0a419-20240606" + reconcilerVersion: "19.0.0-rc-1e1e5cd252-20240606" }); 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 b0356af743..db9af50907 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<<573edab4cc9019514d21527ed1a1468d>> + * @generated SignedSource<<99dfb5afcc0e9f18fc2671f3907b43a8>> */ 'use strict'; @@ -26671,7 +26671,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-rc-b526a0a419-20240606'; +var ReactVersion = '19.0.0-rc-1e1e5cd252-20240606'; /* * 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 455f00b31b..5c1f21c668 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<<01aad9dc1b3e5258b1625899f2dd8824>> + * @generated SignedSource<<38ca9b02c50a0a1ea4961cdd43811111>> */ "use strict"; @@ -10734,11 +10734,11 @@ function traverseOwnerTreeUp(hierarchy, instance) { traverseOwnerTreeUp(hierarchy, instance); } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-rc-b526a0a419-20240606" !== isomorphicReactPackageVersion) +if ("19.0.0-rc-1e1e5cd252-20240606" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-rc-b526a0a419-20240606\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-rc-1e1e5cd252-20240606\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -10788,7 +10788,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1193 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-rc-b526a0a419-20240606", + version: "19.0.0-rc-1e1e5cd252-20240606", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10831,7 +10831,7 @@ var internals$jscomp$inline_1440 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-b526a0a419-20240606" + reconcilerVersion: "19.0.0-rc-1e1e5cd252-20240606" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1441 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 9dad504a58..67ee57b838 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<<5d49e7b8b07ff7bea189bf5c9bdbc4ee>> + * @generated SignedSource<<415004ff3ce757d7f454d526ed577f2d>> */ "use strict"; @@ -11441,11 +11441,11 @@ function traverseOwnerTreeUp(hierarchy, instance) { traverseOwnerTreeUp(hierarchy, instance); } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-rc-b526a0a419-20240606" !== isomorphicReactPackageVersion) +if ("19.0.0-rc-1e1e5cd252-20240606" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-rc-b526a0a419-20240606\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-rc-1e1e5cd252-20240606\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11495,7 +11495,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1274 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-rc-b526a0a419-20240606", + version: "19.0.0-rc-1e1e5cd252-20240606", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11551,7 +11551,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-b526a0a419-20240606" + reconcilerVersion: "19.0.0-rc-1e1e5cd252-20240606" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {