Skip to content

Commit eed2e2d

Browse files
committed
[rn] enabled disableLegacyMode everywhere (#34947)
Stacked on #34946 This should be a noop, now that the legacy renderers are not being sync'd. DiffTrain build for [dd53a94](dd53a94)
1 parent b1358ef commit eed2e2d

File tree

21 files changed

+8964
-11863
lines changed

21 files changed

+8964
-11863
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.3.0-native-fb-90817f88-20251027
1+
19.3.0-native-fb-dd53a946-20251027

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

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

1313
"use strict";
@@ -126,10 +126,20 @@ __DEV__ &&
126126
throw Error("Target container is not a DOM element.");
127127
return createPortal$1(children, container, null, key);
128128
};
129-
exports.flushSync = function () {
130-
throw Error(
131-
"Expected this build of React to not support legacy mode but it does. This is a bug in React."
132-
);
129+
exports.flushSync = function (fn) {
130+
var previousTransition = ReactSharedInternals.T,
131+
previousUpdatePriority = Internals.p;
132+
try {
133+
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
134+
return fn();
135+
} finally {
136+
(ReactSharedInternals.T = previousTransition),
137+
(Internals.p = previousUpdatePriority),
138+
Internals.d.f() &&
139+
console.error(
140+
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
141+
);
142+
}
133143
};
134144
exports.preconnect = function (href, options) {
135145
"string" === typeof href && href
@@ -404,5 +414,5 @@ __DEV__ &&
404414
exports.useFormStatus = function () {
405415
return resolveDispatcher().useHostTransitionStatus();
406416
};
407-
exports.version = "19.3.0-native-fb-90817f88-20251027";
417+
exports.version = "19.3.0-native-fb-dd53a946-20251027";
408418
})();

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

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

1313
"use strict";
@@ -78,10 +78,16 @@ exports.createPortal = function (children, container) {
7878
throw Error(formatProdErrorMessage(299));
7979
return createPortal$1(children, container, null, key);
8080
};
81-
exports.flushSync = function () {
82-
throw Error(
83-
"Expected this build of React to not support legacy mode but it does. This is a bug in React."
84-
);
81+
exports.flushSync = function (fn) {
82+
var previousTransition = ReactSharedInternals.T,
83+
previousUpdatePriority = Internals.p;
84+
try {
85+
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();
86+
} finally {
87+
(ReactSharedInternals.T = previousTransition),
88+
(Internals.p = previousUpdatePriority),
89+
Internals.d.f();
90+
}
8591
};
8692
exports.preconnect = function (href, options) {
8793
"string" === typeof href &&
@@ -203,4 +209,4 @@ exports.useFormState = function (action, initialState, permalink) {
203209
exports.useFormStatus = function () {
204210
return ReactSharedInternals.H.useHostTransitionStatus();
205211
};
206-
exports.version = "19.3.0-native-fb-90817f88-20251027";
212+
exports.version = "19.3.0-native-fb-dd53a946-20251027";

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

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

1313
"use strict";
@@ -78,10 +78,16 @@ exports.createPortal = function (children, container) {
7878
throw Error(formatProdErrorMessage(299));
7979
return createPortal$1(children, container, null, key);
8080
};
81-
exports.flushSync = function () {
82-
throw Error(
83-
"Expected this build of React to not support legacy mode but it does. This is a bug in React."
84-
);
81+
exports.flushSync = function (fn) {
82+
var previousTransition = ReactSharedInternals.T,
83+
previousUpdatePriority = Internals.p;
84+
try {
85+
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();
86+
} finally {
87+
(ReactSharedInternals.T = previousTransition),
88+
(Internals.p = previousUpdatePriority),
89+
Internals.d.f();
90+
}
8591
};
8692
exports.preconnect = function (href, options) {
8793
"string" === typeof href &&
@@ -203,4 +209,4 @@ exports.useFormState = function (action, initialState, permalink) {
203209
exports.useFormStatus = function () {
204210
return ReactSharedInternals.H.useHostTransitionStatus();
205211
};
206-
exports.version = "19.3.0-native-fb-90817f88-20251027";
212+
exports.version = "19.3.0-native-fb-dd53a946-20251027";

0 commit comments

Comments
 (0)