mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: disable React-Fabric stable_sort strict weak sort check in debug mode (#49422)
Summary: Fixes assert crash in https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732. We can temporarily downgrade _LIBCPP_HARDENING_MODE to _LIBCPP_HARDENING_MODE_EXTENSIVE, it disables strict weak ordering check in debug mode. Actually, when we sort animation mutations, we don't need it to satisfy strict weak ordering. https://libcxx.llvm.org/Hardening.html#id3 Another solution is we make sort satisfy it, but we don't have any key to compare when two mutation is the same mutation type but not the same parentTag. Maybe we can use pointer of muation to compare? ## Changelog: [IOS] [FIXED] - Fabric: disable React-Fabric stable_sort strict weak sort check in debug mode Pull Request resolved: https://github.com/facebook/react-native/pull/49422 Test Plan: Fixes https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732. Reviewed By: sammy-SC Differential Revision: D69984937 Pulled By: cipolleschi fbshipit-source-id: 2a3d17970def513c4ba915068f25338169db82d6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6f968f01eb
commit
929c8e4baa
@@ -104,15 +104,11 @@ static inline bool shouldFirstComeBeforeSecondMutation(
|
||||
// must come first.
|
||||
if (lhs.type == ShadowViewMutation::Type::Remove &&
|
||||
lhs.parentTag == rhs.parentTag) {
|
||||
if (lhs.index > rhs.index) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return lhs.index > rhs.index;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return &lhs < &rhs;
|
||||
}
|
||||
|
||||
std::pair<Float, Float> calculateAnimationProgress(
|
||||
|
||||
Reference in New Issue
Block a user