Skip to content

Commit 104b0cc

Browse files
Mehdi Mulanigrabbou
authored andcommitted
Remove RCTUIImageViewAnimated WeakProxy gating
Summary: To help determine how severe this issue is, put the fix behind a MC. We will only pick the parent diff to the RC branch so that the fix immediately goes to master and we don't have to worry about fixing this any further. Reviewed By: fkgozali Differential Revision: D16940181 fbshipit-source-id: 91eb08181f82f51aea6a20b3fd489a33bdc0e424
1 parent 6d6b532 commit 104b0cc

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

Libraries/Image/RCTUIImageViewAnimated.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#import <React/RCTAnimatedImage.h>
99
#import <React/RCTDefines.h>
1010

11-
RCT_EXTERN void RCTUIImageViewEnableWeakProxy(BOOL enabled);
12-
1311
@interface RCTUIImageViewAnimated : UIImageView
1412

1513
@end

Libraries/Image/RCTUIImageViewAnimated.m

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
#import <mach/mach.h>
1212
#import <objc/runtime.h>
1313

14-
static BOOL weakProxyEnabled = YES;
15-
void RCTUIImageViewEnableWeakProxy(BOOL enabled) {
16-
weakProxyEnabled = enabled;
17-
}
18-
1914
static NSUInteger RCTDeviceTotalMemory() {
2015
return (NSUInteger)[[NSProcessInfo processInfo] physicalMemory];
2116
}
@@ -152,9 +147,7 @@ - (NSOperationQueue *)fetchQueue
152147
- (CADisplayLink *)displayLink
153148
{
154149
if (!_displayLink) {
155-
__weak typeof(self) weakSelf = self;
156-
id target = weakProxyEnabled ? [RCTWeakProxy weakProxyWithTarget:self] : weakSelf;
157-
_displayLink = [CADisplayLink displayLinkWithTarget:target selector:@selector(displayDidRefresh:)];
150+
_displayLink = [CADisplayLink displayLinkWithTarget:[RCTWeakProxy weakProxyWithTarget:self] selector:@selector(displayDidRefresh:)];
158151
NSString *runLoopMode = [NSProcessInfo processInfo].activeProcessorCount > 1 ? NSRunLoopCommonModes : NSDefaultRunLoopMode;
159152
[_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:runLoopMode];
160153
}

0 commit comments

Comments
 (0)