Clean up YogaLayoutableShadowNode (re-enable assert, name sentinel, document ABA) (#57064)#57064
Open
javache wants to merge 1 commit into
Open
Clean up YogaLayoutableShadowNode (re-enable assert, name sentinel, document ABA) (#57064)#57064javache wants to merge 1 commit into
javache wants to merge 1 commit into
Conversation
|
@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107079944. |
javache
added a commit
to javache/react-native
that referenced
this pull request
Jun 3, 2026
…ocument ABA) (facebook#57064) Summary: Three small cleanups uncovered during review of the clone path: - Re-enable the dirty-flag inheritance assert in the clone constructor. It was disabled while the background executor was potentially racing the JS thread; background executor is no longer in use, so the assert is meaningful again. - Lift the `0xBADC0FFEE0DDF00D` magic owner sentinel out into a named `yoga::Node* const` (`reinterpret_cast` is not constexpr, so it can't be `constexpr`). The bit pattern stays the same so it remains recognisable in debuggers. - Move the explanatory comment for `updateYogaChildrenOwnersIfNeeded` next to its implementation and rewrite it to clearly describe the ABA scenario it guards against (and the common no-op case). Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D107079944
7a5bae6 to
872e741
Compare
…ocument ABA) (facebook#57064) Summary: Pull Request resolved: facebook#57064 Three small cleanups uncovered during review of the clone path: - Re-enable the dirty-flag inheritance assert in the clone constructor. It was disabled while the background executor was potentially racing the JS thread; background executor is no longer in use, so the assert is meaningful again. - Lift the `0xBADC0FFEE0DDF00D` magic owner sentinel out into a named `yoga::Node* const` (`reinterpret_cast` is not constexpr, so it can't be `constexpr`). The bit pattern stays the same so it remains recognisable in debuggers. - Move the explanatory comment for `updateYogaChildrenOwnersIfNeeded` next to its implementation and rewrite it to clearly describe the ABA scenario it guards against (and the common no-op case). Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D107079944
872e741 to
2e4edc2
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Three small cleanups uncovered during review of the clone path:
constructor. It was disabled while the background executor was
potentially racing the JS thread; background executor is no
longer in use, so the assert is meaningful again.
0xBADC0FFEE0DDF00Dmagic owner sentinel out into anamed
yoga::Node* const(reinterpret_castis not constexpr,so it can't be
constexpr). The bit pattern stays the same soit remains recognisable in debuggers.
updateYogaChildrenOwnersIfNeedednext to its implementation and rewrite it to clearly describe the
ABA scenario it guards against (and the common no-op case).
Changelog:
[Internal]
Reviewed By: christophpurrer
Differential Revision: D107079944