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:
Valentin Shergin
2019-10-21 09:42:43 -07:00
committed by Facebook Github Bot
parent c5f704b8e3
commit 7186a65b13
4 changed files with 10 additions and 11 deletions
@@ -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