Skip to content

Commit

Permalink
[native-fb] set consoleManagedByDevToolsDuringStrictMode flag to true (
Browse files Browse the repository at this point in the history
…#30338)

Reflecting D59232098.

DiffTrain build for commit fc1371f.
  • Loading branch information
kassens committed Jul 15, 2024
1 parent e7770a1 commit 7d4aaba
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 113 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-native-fb-ff89ba73-20240712
19.0.0-native-fb-fc1371f6-20240715
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<19de64da095c2c7e3388344fab7cc610>>
* @generated SignedSource<<807d7defa7798acbd559251923830aa0>>
*/

"use strict";
Expand Down Expand Up @@ -15187,14 +15187,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
reconcilerVersion: "19.0.0-native-fb-fc1371f6-20240715"
});
})({
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 1,
version: "19.0.0-native-fb-ff89ba73-20240712",
version: "19.0.0-native-fb-fc1371f6-20240715",
rendererPackageName: "react-test-renderer"
});
exports._Scheduler = Scheduler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4f9aad0039a58edc294ac1ffb35cf646>>
* @generated SignedSource<<41bfc6c5964719c61efcaacbfd9ccbe1>>
*/

"use strict";
Expand Down Expand Up @@ -9406,7 +9406,7 @@ var devToolsConfig$jscomp$inline_1034 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-ff89ba73-20240712",
version: "19.0.0-native-fb-fc1371f6-20240715",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1223 = {
Expand Down Expand Up @@ -9437,7 +9437,7 @@ var internals$jscomp$inline_1223 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
reconcilerVersion: "19.0.0-native-fb-fc1371f6-20240715"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1224 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<fb448777f99d7293b15b2c2ee900f79a>>
* @generated SignedSource<<50896144af79bc0d06cc1efa52989bd2>>
*/

"use strict";
Expand Down Expand Up @@ -10026,7 +10026,7 @@ var devToolsConfig$jscomp$inline_1117 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-ff89ba73-20240712",
version: "19.0.0-native-fb-fc1371f6-20240715",
rendererPackageName: "react-test-renderer"
};
(function (internals) {
Expand Down Expand Up @@ -10070,7 +10070,7 @@ var devToolsConfig$jscomp$inline_1117 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
reconcilerVersion: "19.0.0-native-fb-fc1371f6-20240715"
});
exports._Scheduler = Scheduler;
exports.act = act;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<05c7ee933513ad1b782df8f4f98b3a99>>
* @generated SignedSource<<9e43796dad26b65aef2351c647691b29>>
*/

"use strict";
Expand Down Expand Up @@ -1748,7 +1748,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-native-fb-ff89ba73-20240712";
exports.version = "19.0.0-native-fb-fc1371f6-20240715";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<3404547d78b70a55bb7651957a6be743>>
* @generated SignedSource<<46ebc18bdae76b802420ba85977104d3>>
*/

"use strict";
Expand Down Expand Up @@ -604,4 +604,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-ff89ba73-20240712";
exports.version = "19.0.0-native-fb-fc1371f6-20240715";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<16f1655f4bb3c6d677aa7a304ac0af37>>
* @generated SignedSource<<a6beab1e2ddc879fd5524db195123a39>>
*/

"use strict";
Expand Down Expand Up @@ -608,7 +608,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-ff89ba73-20240712";
exports.version = "19.0.0-native-fb-fc1371f6-20240715";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff89ba734668fdac06e8de476486830bbf9e0785
fc1371f6bf656821e92c3c41bf65f58686504001
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<cb52d8f0a33b4839c55863e4803d246e>>
* @generated SignedSource<<c187e11a9478ecae821aa269657417f6>>
*/

"use strict";
Expand Down Expand Up @@ -1495,24 +1495,20 @@ __DEV__ &&
}
}
function setIsStrictModeForDevtools(newIsStrictMode) {
if (consoleManagedByDevToolsDuringStrictMode) {
if (
("function" === typeof log$1 &&
(unstable_setDisableYieldValue(newIsStrictMode),
(suppressWarning = newIsStrictMode)),
injectedHook && "function" === typeof injectedHook.setStrictMode)
)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
hasLoggedError ||
((hasLoggedError = !0),
error$jscomp$0(
"React instrumentation encountered an error: %s",
err
));
}
} else newIsStrictMode ? disableLogs() : reenableLogs();
"function" === typeof log$1 &&
(unstable_setDisableYieldValue(newIsStrictMode),
(suppressWarning = newIsStrictMode));
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
hasLoggedError ||
((hasLoggedError = !0),
error$jscomp$0(
"React instrumentation encountered an error: %s",
err
));
}
}
function injectProfilingHooks(profilingHooks) {
injectedProfilingHooks = profilingHooks;
Expand Down Expand Up @@ -14251,8 +14247,6 @@ __DEV__ &&
suppressWarning = !1,
isArrayImpl = Array.isArray,
alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries,
consoleManagedByDevToolsDuringStrictMode =
dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode,
disableDefaultPropsExceptForClasses =
dynamicFlagsUntyped.disableDefaultPropsExceptForClasses,
enableAddPropertiesFastPath =
Expand Down Expand Up @@ -16817,12 +16811,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
reconcilerVersion: "19.0.0-native-fb-fc1371f6-20240715"
});
})({
findFiberByHostInstance: getInstanceFromNode,
bundleType: 1,
version: "19.0.0-native-fb-ff89ba73-20240712",
version: "19.0.0-native-fb-fc1371f6-20240715",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<019180a5199710c4c1aa6124653222df>>
* @generated SignedSource<<e70e2f329e5ac6a6a2556a1a11ffc8f2>>
*/

"use strict";
Expand All @@ -18,8 +18,6 @@ var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/R
Scheduler = require("scheduler"),
isArrayImpl = Array.isArray,
alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries,
consoleManagedByDevToolsDuringStrictMode =
dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode,
disableDefaultPropsExceptForClasses =
dynamicFlagsUntyped.disableDefaultPropsExceptForClasses,
enableAddPropertiesFastPath = dynamicFlagsUntyped.enableAddPropertiesFastPath,
Expand Down Expand Up @@ -1657,12 +1655,8 @@ function onCommitRoot(root) {
} catch (err) {}
}
function setIsStrictModeForDevtools(newIsStrictMode) {
if (
consoleManagedByDevToolsDuringStrictMode &&
("function" === typeof log$1 &&
unstable_setDisableYieldValue(newIsStrictMode),
injectedHook && "function" === typeof injectedHook.setStrictMode)
)
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {}
Expand Down Expand Up @@ -10632,7 +10626,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1136 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-native-fb-ff89ba73-20240712",
version: "19.0.0-native-fb-fc1371f6-20240715",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10675,7 +10669,7 @@ var internals$jscomp$inline_1362 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
reconcilerVersion: "19.0.0-native-fb-fc1371f6-20240715"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1363 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<30378a5bc02b2b4f128d1c2c9b10ecd1>>
* @generated SignedSource<<d8be9c00f80e631c9664177db73e5c3b>>
*/

"use strict";
Expand All @@ -22,8 +22,6 @@ var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/R
React = require("react"),
isArrayImpl = Array.isArray,
alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries,
consoleManagedByDevToolsDuringStrictMode =
dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode,
disableDefaultPropsExceptForClasses =
dynamicFlagsUntyped.disableDefaultPropsExceptForClasses,
enableAddPropertiesFastPath = dynamicFlagsUntyped.enableAddPropertiesFastPath,
Expand Down Expand Up @@ -1680,12 +1678,8 @@ function onCommitRoot(root, eventPriority) {
} catch (err) {}
}
function setIsStrictModeForDevtools(newIsStrictMode) {
if (
consoleManagedByDevToolsDuringStrictMode &&
("function" === typeof log$1 &&
unstable_setDisableYieldValue(newIsStrictMode),
injectedHook && "function" === typeof injectedHook.setStrictMode)
)
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {}
Expand Down Expand Up @@ -11342,7 +11336,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1217 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-native-fb-ff89ba73-20240712",
version: "19.0.0-native-fb-fc1371f6-20240715",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11398,7 +11392,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
reconcilerVersion: "19.0.0-native-fb-fc1371f6-20240715"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f40fe7e4fcad53bb52ff550e9c1ac46c>>
* @generated SignedSource<<ab02954b794765fe68c9cb9644087ac1>>
*/

"use strict";
Expand Down Expand Up @@ -1594,24 +1594,20 @@ __DEV__ &&
}
}
function setIsStrictModeForDevtools(newIsStrictMode) {
if (consoleManagedByDevToolsDuringStrictMode) {
if (
("function" === typeof log$1 &&
(unstable_setDisableYieldValue(newIsStrictMode),
(suppressWarning = newIsStrictMode)),
injectedHook && "function" === typeof injectedHook.setStrictMode)
)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
hasLoggedError ||
((hasLoggedError = !0),
error$jscomp$0(
"React instrumentation encountered an error: %s",
err
));
}
} else newIsStrictMode ? disableLogs() : reenableLogs();
"function" === typeof log$1 &&
(unstable_setDisableYieldValue(newIsStrictMode),
(suppressWarning = newIsStrictMode));
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
hasLoggedError ||
((hasLoggedError = !0),
error$jscomp$0(
"React instrumentation encountered an error: %s",
err
));
}
}
function injectProfilingHooks(profilingHooks) {
injectedProfilingHooks = profilingHooks;
Expand Down Expand Up @@ -14387,8 +14383,6 @@ __DEV__ &&
suppressWarning = !1,
isArrayImpl = Array.isArray,
alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries,
consoleManagedByDevToolsDuringStrictMode =
dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode,
disableDefaultPropsExceptForClasses =
dynamicFlagsUntyped.disableDefaultPropsExceptForClasses,
enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber,
Expand Down Expand Up @@ -17005,11 +16999,11 @@ __DEV__ &&
var emptyObject = {};
Object.freeze(emptyObject);
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-ff89ba73-20240712" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-fc1371f6-20240715" !== 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-native-fb-ff89ba73-20240712\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-fc1371f6-20240715\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -17057,12 +17051,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
reconcilerVersion: "19.0.0-native-fb-fc1371f6-20240715"
});
})({
findFiberByHostInstance: getInstanceFromTag,
bundleType: 1,
version: "19.0.0-native-fb-ff89ba73-20240712",
version: "19.0.0-native-fb-fc1371f6-20240715",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down
Loading

0 comments on commit 7d4aaba

Please sign in to comment.