-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set return pointer when reusing current tree (#20212)
* Do not fix return pointers during commit phase In the commit phase, we should be able to assume that the `return` pointers in the just-completed tree are consistent. The render phase should be responsible for ensuring these are always correct. I've removed the `return` pointer assignments from the render phase traversal logic. This isn't all of them, only the ones added recently during the effects refactor. The other ones have been around longer so I'll leave those for a later clean up. This breaks a few SuspenseList tests; I'll fix in the next commit. * Set return pointer when reusing current tree We always set the return pointer on freshly cloned, work-in-progress fibers. However, we were neglecting to set them on trees that are reused from current. I fixed this in the same path of the complete phase where we reset the fiber flags. This is a code smell because it assumes the commit phase is never concurrent with the render phase. Our eventual goal is to make fibers a lock free data structure. Will address further during refactor to alternate model.
- Loading branch information
Showing
2 changed files
with
10 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters