Skip to content

Commit 848ae6c

Browse files
committed
[Float][Fiber] Assume stylesheets in document are already loaded (#29811)
When we made stylesheets suspend even during high priority updates we exposed a bug in the loading tracking of stylesheets that are loaded as part of the preamble. This allowed these stylesheets to put suspense boundaries into fallback mode more often than expected because cases where a stylesheet was server rendered could now cause a fallback to trigger which was never intended to happen. This fix updates resource construction to evaluate whether the instance exists in the DOM prior to construction and if so marks the resource as loaded and inserted. One ambiguity that needed to be solved still is how to tell whether a stylesheet rendered as part of a late Suspense boundary reveal is already loaded. I updated the instruction to clear out the loading promise after successfully loading. This is useful because later if we encounter this same resource again we can avoid the microtask if it is already loaded. It also means that we can concretely understand that if a stylesheet is in the DOM without this marker then it must have loaded (or errored) already. DiffTrain build for commit 20b6f4c.
1 parent 3ffc777 commit 848ae6c

File tree

14 files changed

+36
-36
lines changed

14 files changed

+36
-36
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.0.0-native-fb-20841f9a62-20240607
1+
19.0.0-native-fb-20b6f4c0e8-20240607

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<1e3975bb7b9fe350a36865e6c41276e8>>
10+
* @generated SignedSource<<016b8e5005c3117269d148d069d42a3c>>
1111
*/
1212

1313
'use strict';
@@ -23586,7 +23586,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
2358623586
return root;
2358723587
}
2358823588

23589-
var ReactVersion = '19.0.0-native-fb-20841f9a62-20240607';
23589+
var ReactVersion = '19.0.0-native-fb-20b6f4c0e8-20240607';
2359023590

2359123591
/*
2359223592
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<a11af6f9b212cf2aeebb79b52de06240>>
10+
* @generated SignedSource<<f437fde2b5cc5cf271a2b134492f83ff>>
1111
*/
1212

1313
"use strict";
@@ -9336,7 +9336,7 @@ var devToolsConfig$jscomp$inline_1048 = {
93369336
throw Error("TestRenderer does not support findFiberByHostInstance()");
93379337
},
93389338
bundleType: 0,
9339-
version: "19.0.0-native-fb-20841f9a62-20240607",
9339+
version: "19.0.0-native-fb-20b6f4c0e8-20240607",
93409340
rendererPackageName: "react-test-renderer"
93419341
};
93429342
var internals$jscomp$inline_1235 = {
@@ -9367,7 +9367,7 @@ var internals$jscomp$inline_1235 = {
93679367
scheduleRoot: null,
93689368
setRefreshHandler: null,
93699369
getCurrentFiber: null,
9370-
reconcilerVersion: "19.0.0-native-fb-20841f9a62-20240607"
9370+
reconcilerVersion: "19.0.0-native-fb-20b6f4c0e8-20240607"
93719371
};
93729372
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
93739373
var hook$jscomp$inline_1236 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<d5ac2136799fa3f299d972c903df46a7>>
10+
* @generated SignedSource<<760cde75b26f1ffde19c02e46adb578b>>
1111
*/
1212

1313
"use strict";
@@ -9958,7 +9958,7 @@ var devToolsConfig$jscomp$inline_1131 = {
99589958
throw Error("TestRenderer does not support findFiberByHostInstance()");
99599959
},
99609960
bundleType: 0,
9961-
version: "19.0.0-native-fb-20841f9a62-20240607",
9961+
version: "19.0.0-native-fb-20b6f4c0e8-20240607",
99629962
rendererPackageName: "react-test-renderer"
99639963
};
99649964
(function (internals) {
@@ -10002,7 +10002,7 @@ var devToolsConfig$jscomp$inline_1131 = {
1000210002
scheduleRoot: null,
1000310003
setRefreshHandler: null,
1000410004
getCurrentFiber: null,
10005-
reconcilerVersion: "19.0.0-native-fb-20841f9a62-20240607"
10005+
reconcilerVersion: "19.0.0-native-fb-20b6f4c0e8-20240607"
1000610006
});
1000710007
exports._Scheduler = Scheduler;
1000810008
exports.act = act;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<ff060bbd88a6beeead57e84d35a86af9>>
10+
* @generated SignedSource<<9cbef442c26efa70ee446da21a60c04a>>
1111
*/
1212

1313
'use strict';
@@ -24,7 +24,7 @@ if (
2424
}
2525
var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags');
2626

27-
var ReactVersion = '19.0.0-native-fb-20841f9a62-20240607';
27+
var ReactVersion = '19.0.0-native-fb-20b6f4c0e8-20240607';
2828

2929
// Re-export dynamic flags from the internal module.
3030
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<2ffd656ec0297ecbc31dc231e472fdcc>>
10+
* @generated SignedSource<<c219dcd8f45478b8be32095daf648132>>
1111
*/
1212

1313
"use strict";
@@ -604,4 +604,4 @@ exports.useSyncExternalStore = function (
604604
exports.useTransition = function () {
605605
return ReactSharedInternals.H.useTransition();
606606
};
607-
exports.version = "19.0.0-native-fb-20841f9a62-20240607";
607+
exports.version = "19.0.0-native-fb-20b6f4c0e8-20240607";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<f0f71fc7f22a13063a2728358a9bb19f>>
10+
* @generated SignedSource<<6a83e2f57b46ce727606dc77968167b1>>
1111
*/
1212

1313
"use strict";
@@ -608,7 +608,7 @@ exports.useSyncExternalStore = function (
608608
exports.useTransition = function () {
609609
return ReactSharedInternals.H.useTransition();
610610
};
611-
exports.version = "19.0.0-native-fb-20841f9a62-20240607";
611+
exports.version = "19.0.0-native-fb-20b6f4c0e8-20240607";
612612
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
613613
"function" ===
614614
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20841f9a6205a633e6d08a274db974481daaca23
1+
20b6f4c0e8a1f40ee61735201645e0395ff08f94

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<296800793d2a2f729d1bff6f79a75838>>
10+
* @generated SignedSource<<4f525e82c9094381536a076a2645ab79>>
1111
*/
1212

1313
'use strict';
@@ -26322,7 +26322,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
2632226322
return root;
2632326323
}
2632426324

26325-
var ReactVersion = '19.0.0-native-fb-20841f9a62-20240607';
26325+
var ReactVersion = '19.0.0-native-fb-20b6f4c0e8-20240607';
2632626326

2632726327
/*
2632826328
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<2e93e3cb365a6be9a8ee47867dac0398>>
10+
* @generated SignedSource<<7a96adf78698dcde93c8ad299e54be2b>>
1111
*/
1212

1313
"use strict";
@@ -10591,7 +10591,7 @@ var roots = new Map(),
1059110591
devToolsConfig$jscomp$inline_1125 = {
1059210592
findFiberByHostInstance: getInstanceFromNode,
1059310593
bundleType: 0,
10594-
version: "19.0.0-native-fb-20841f9a62-20240607",
10594+
version: "19.0.0-native-fb-20b6f4c0e8-20240607",
1059510595
rendererPackageName: "react-native-renderer",
1059610596
rendererConfig: {
1059710597
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -10634,7 +10634,7 @@ var internals$jscomp$inline_1351 = {
1063410634
scheduleRoot: null,
1063510635
setRefreshHandler: null,
1063610636
getCurrentFiber: null,
10637-
reconcilerVersion: "19.0.0-native-fb-20841f9a62-20240607"
10637+
reconcilerVersion: "19.0.0-native-fb-20b6f4c0e8-20240607"
1063810638
};
1063910639
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1064010640
var hook$jscomp$inline_1352 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

0 commit comments

Comments
 (0)