Skip to content

Commit 91537cd

Browse files
committed
Enable enableUnifiedSyncLane (#27646)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> The flag has been tested internally on WWW, should be good to set to true for OSS. Added a dynamic flag for fb RN. ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> yarn test DiffTrain build for [52d542a](52d542a)
1 parent c7e4e4f commit 91537cd

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2c8a139a593e0294c3a6953d74b451bd05fdcfca
1+
52d542ad6d410008c495084f511247f43387055f

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,4 +587,4 @@ exports.useSyncExternalStore = function (
587587
exports.useTransition = function () {
588588
return ReactCurrentDispatcher.current.useTransition();
589589
};
590-
exports.version = "18.3.0-www-classic-4b8ff8ef";
590+
exports.version = "18.3.0-www-classic-4602af1b";

compiled/facebook-www/ReactTestRenderer-dev.classic.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ if (__DEV__) {
11801180
var DefaultLane =
11811181
/* */
11821182
32;
1183-
var SyncUpdateLanes = SyncLane;
1183+
var SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane;
11841184
var TransitionHydrationLane =
11851185
/* */
11861186
64;
@@ -1275,6 +1275,14 @@ if (__DEV__) {
12751275
var nextRetryLane = RetryLane1;
12761276

12771277
function getHighestPriorityLanes(lanes) {
1278+
{
1279+
var pendingSyncLanes = lanes & SyncUpdateLanes;
1280+
1281+
if (pendingSyncLanes !== 0) {
1282+
return pendingSyncLanes;
1283+
}
1284+
}
1285+
12781286
switch (getHighestPriorityLane(lanes)) {
12791287
case SyncHydrationLane:
12801288
return SyncHydrationLane;
@@ -1873,7 +1881,9 @@ if (__DEV__) {
18731881
var renderLane = getHighestPriorityLane(renderLanes);
18741882
var lane;
18751883

1876-
{
1884+
if ((renderLane & SyncUpdateLanes) !== NoLane) {
1885+
lane = SyncHydrationLane;
1886+
} else {
18771887
switch (renderLane) {
18781888
case SyncLane:
18791889
lane = SyncHydrationLane;
@@ -25720,7 +25730,7 @@ if (__DEV__) {
2572025730
return root;
2572125731
}
2572225732

25723-
var ReactVersion = "18.3.0-www-classic-4b8ff8ef";
25733+
var ReactVersion = "18.3.0-www-classic-4602af1b";
2572425734

2572525735
// Might add PROFILE later.
2572625736

compiled/facebook-www/ReactTestRenderer-dev.modern.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ if (__DEV__) {
11801180
var DefaultLane =
11811181
/* */
11821182
32;
1183-
var SyncUpdateLanes = SyncLane;
1183+
var SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane;
11841184
var TransitionHydrationLane =
11851185
/* */
11861186
64;
@@ -1275,6 +1275,14 @@ if (__DEV__) {
12751275
var nextRetryLane = RetryLane1;
12761276

12771277
function getHighestPriorityLanes(lanes) {
1278+
{
1279+
var pendingSyncLanes = lanes & SyncUpdateLanes;
1280+
1281+
if (pendingSyncLanes !== 0) {
1282+
return pendingSyncLanes;
1283+
}
1284+
}
1285+
12781286
switch (getHighestPriorityLane(lanes)) {
12791287
case SyncHydrationLane:
12801288
return SyncHydrationLane;
@@ -1873,7 +1881,9 @@ if (__DEV__) {
18731881
var renderLane = getHighestPriorityLane(renderLanes);
18741882
var lane;
18751883

1876-
{
1884+
if ((renderLane & SyncUpdateLanes) !== NoLane) {
1885+
lane = SyncHydrationLane;
1886+
} else {
18771887
switch (renderLane) {
18781888
case SyncLane:
18791889
lane = SyncHydrationLane;
@@ -25720,7 +25730,7 @@ if (__DEV__) {
2572025730
return root;
2572125731
}
2572225732

25723-
var ReactVersion = "18.3.0-www-modern-aa96362d";
25733+
var ReactVersion = "18.3.0-www-modern-9a10673b";
2572425734

2572525735
// Might add PROFILE later.
2572625736

0 commit comments

Comments
 (0)