Commit b31f950
committed
Fix incorrect use of NoLanes in executionContext check (#33170)
## Summary
This PR fixes a likely incorrect condition in the
`scheduleUpdateOnFiber` function inside `ReactFiberWorkLoop.js`.
Previously, the code checked:
```js
(executionContext & RenderContext) !== NoLanes
````
However, `NoLanes` is part of the lane priority system, not the
execution context flags. The intent here seems to be to detect whether
the current execution context includes `RenderContext`, which should be
compared against `NoContext`, not `NoLanes`.
This fix replaces `NoLanes` with `NoContext` for semantic correctness
and consistency with other checks throughout the codebase.
**Fixes
[[#33169](https://github.com/facebook/react/issues/33169)](https://github.com/facebook/react/issues/33169)**
---
## How did you test this change?
I ran the following commands to validate correctness and ensure nothing
was broken:
* `yarn lint`
* `yarn linc`
* `yarn test`
* `yarn test --prod`
* `yarn flow`
* `yarn prettier`
All checks passed. Since this is a minor internal logic fix and doesn't
change public behavior or APIs, no additional tests are necessary at
this time.
DiffTrain build for [bfaeb4a](bfaeb4a)1 parent c8e7b27 commit b31f950
File tree
34 files changed
+96
-96
lines changed- compiled/facebook-www
34 files changed
+96
-96
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
1540 | | - | |
| 1540 | + | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
1540 | | - | |
| 1540 | + | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13971 | 13971 | | |
13972 | 13972 | | |
13973 | 13973 | | |
13974 | | - | |
| 13974 | + | |
13975 | 13975 | | |
13976 | 13976 | | |
13977 | 13977 | | |
| |||
19080 | 19080 | | |
19081 | 19081 | | |
19082 | 19082 | | |
19083 | | - | |
| 19083 | + | |
19084 | 19084 | | |
19085 | 19085 | | |
19086 | | - | |
| 19086 | + | |
19087 | 19087 | | |
19088 | 19088 | | |
19089 | 19089 | | |
| |||
19117 | 19117 | | |
19118 | 19118 | | |
19119 | 19119 | | |
19120 | | - | |
| 19120 | + | |
19121 | 19121 | | |
19122 | 19122 | | |
19123 | 19123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13789 | 13789 | | |
13790 | 13790 | | |
13791 | 13791 | | |
13792 | | - | |
| 13792 | + | |
13793 | 13793 | | |
13794 | 13794 | | |
13795 | 13795 | | |
| |||
18852 | 18852 | | |
18853 | 18853 | | |
18854 | 18854 | | |
18855 | | - | |
| 18855 | + | |
18856 | 18856 | | |
18857 | 18857 | | |
18858 | | - | |
| 18858 | + | |
18859 | 18859 | | |
18860 | 18860 | | |
18861 | 18861 | | |
| |||
18889 | 18889 | | |
18890 | 18890 | | |
18891 | 18891 | | |
18892 | | - | |
| 18892 | + | |
18893 | 18893 | | |
18894 | 18894 | | |
18895 | 18895 | | |
| |||
0 commit comments