mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Changes in BaseTextShadowNode to remove usage of shared_from_this()
Summary: This is another step on the journey of removing `enable_shared_from_this`. It's unclear why we used that before but it's clear now that using shared_ptr here is not necessary because all computation around happens inside the single callstack, so by definition we don't have object life-time concerns here. Changelog: [Internal] Small Fabric-specific optimization. Reviewed By: sammy-SC Differential Revision: D17973957 fbshipit-source-id: 09a65c78e22083ed21b041240307f4858379cc60
This commit is contained in:
committed by
Facebook Github Bot
parent
c5f704b8e3
commit
7186a65b13
+1
-2
@@ -35,8 +35,7 @@ AttributedString AndroidTextInputShadowNode::getAttributedString() const {
|
||||
textAttributes.apply(getProps()->textAttributes);
|
||||
|
||||
// Use BaseTextShadowNode to get attributed string from children
|
||||
return BaseTextShadowNode::getAttributedString(
|
||||
textAttributes, shared_from_this());
|
||||
return BaseTextShadowNode::getAttributedString(textAttributes, *this);
|
||||
}
|
||||
|
||||
#pragma mark - LayoutableShadowNode
|
||||
|
||||
Reference in New Issue
Block a user