diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd11f328..bd484096e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## master * Add your own contributions to the next release on the line below this with your name. +- [ASNetworkImageNode] Fix deadlock in GIF handling. [#582](https://github.com/TextureGroup/Texture/pull/582) [Garrett Moon](https://github.com/garrettmoon) - [ASDisplayNode] Add attributed versions of a11y label, hint and value. [#554](https://github.com/TextureGroup/Texture/pull/554) [Alexander Hüllmandel](https://github.com/fruitcoder) - [ASCornerRounding] Introduce .cornerRoundingType: CALayer, Precomposited, or Clip Corners. [Scott Goodson](https://github.com/appleguy) [#465](https://github.com/TextureGroup/Texture/pull/465) - [Yoga] Add insertYogaNode:atIndex: method. Improve handling of relayouts. [Scott Goodson](https://github.com/appleguy) diff --git a/Source/ASImageNode+AnimatedImage.mm b/Source/ASImageNode+AnimatedImage.mm index 0d12351dd..2ceed182f 100644 --- a/Source/ASImageNode+AnimatedImage.mm +++ b/Source/ASImageNode+AnimatedImage.mm @@ -20,6 +20,7 @@ #import #import #import +#import #import #import #import @@ -43,7 +44,7 @@ @implementation ASImageNode (AnimatedImage) - (void)setAnimatedImage:(id )animatedImage { - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); [self _locked_setAnimatedImage:animatedImage]; } @@ -85,13 +86,13 @@ - (void)animatedImageSet:(id )newAnimatedImage previous - (id )animatedImage { - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); return _animatedImage; } - (void)setAnimatedImagePaused:(BOOL)animatedImagePaused { - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); _animatedImagePaused = animatedImagePaused; @@ -100,13 +101,13 @@ - (void)setAnimatedImagePaused:(BOOL)animatedImagePaused - (BOOL)animatedImagePaused { - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); return _animatedImagePaused; } - (void)setCoverImageCompleted:(UIImage *)coverImage { - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); [self _locked_setCoverImageCompleted:coverImage]; } @@ -123,7 +124,7 @@ - (void)_locked_setCoverImageCompleted:(UIImage *)coverImage - (void)setCoverImage:(UIImage *)coverImage { - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); [self _locked_setCoverImage:coverImage]; } @@ -161,7 +162,7 @@ - (void)setAnimatedImageRunLoopMode:(NSString *)runLoopMode - (void)setShouldAnimate:(BOOL)shouldAnimate { - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); [self _locked_setShouldAnimate:shouldAnimate]; } @@ -194,7 +195,7 @@ - (void)startAnimating { ASDisplayNodeAssertMainThread(); - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); [self _locked_startAnimating]; } @@ -233,7 +234,7 @@ - (void)stopAnimating { ASDisplayNodeAssertMainThread(); - ASDN::MutexLocker l(_animatedImageLock); + ASDN::MutexLocker l(__instanceLock__); [self _locked_stopAnimating]; } diff --git a/Source/Private/ASImageNode+AnimatedImagePrivate.h b/Source/Private/ASImageNode+AnimatedImagePrivate.h index 6c08ce617..6e57d51dd 100644 --- a/Source/Private/ASImageNode+AnimatedImagePrivate.h +++ b/Source/Private/ASImageNode+AnimatedImagePrivate.h @@ -21,7 +21,6 @@ extern NSString *const ASAnimatedImageDefaultRunLoopMode; @interface ASImageNode () { - ASDN::RecursiveMutex _animatedImageLock; ASDN::Mutex _displayLinkLock; id _animatedImage; BOOL _animatedImagePaused;