Skip to content

Commit cd448a1

Browse files
author
Adlai Holler
authored
Add lock on ASTextNode.attributedText (facebookarchive#3025)
1 parent 1bf8488 commit cd448a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

AsyncDisplayKit/ASTextNode.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ @implementation ASTextNode {
134134

135135
NSArray *_exclusionPaths;
136136

137+
NSAttributedString *_attributedText;
137138
NSAttributedString *_composedTruncationText;
138139

139140
NSString *_highlightedLinkAttributeName;
@@ -368,6 +369,12 @@ + (CGFloat)ascenderWithAttributedString:(NSAttributedString *)attributedString
368369
return lineHeight + font.descender;
369370
}
370371

372+
- (NSAttributedString *)attributedText
373+
{
374+
ASDN::MutexLocker l(__instanceLock__);
375+
return _attributedText;
376+
}
377+
371378
- (void)setAttributedText:(NSAttributedString *)attributedText
372379
{
373380

0 commit comments

Comments
 (0)