Index: ios/chrome/browser/ui/overscroll_actions/overscroll_actions_gesture_recognizer.mm |
diff --git a/ios/chrome/browser/ui/overscroll_actions/overscroll_actions_gesture_recognizer.mm b/ios/chrome/browser/ui/overscroll_actions/overscroll_actions_gesture_recognizer.mm |
index c016de15b2598ca14aa64a6189aa62fd7e18eeca..617baea88da2fc7a63cfd6e2c4942cc36dc6fe1d 100644 |
--- a/ios/chrome/browser/ui/overscroll_actions/overscroll_actions_gesture_recognizer.mm |
+++ b/ios/chrome/browser/ui/overscroll_actions/overscroll_actions_gesture_recognizer.mm |
@@ -6,10 +6,14 @@ |
#import <UIKit/UIGestureRecognizerSubclass.h> |
-#import "base/ios/weak_nsobject.h" |
+#import "base/logging.h" |
+ |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
@interface OverscrollActionsGestureRecognizer () { |
- base::WeakNSProtocol<id> target_; |
+ __weak id target_; |
SEL action_; |
} |
@end |
@@ -19,7 +23,7 @@ |
- (instancetype)initWithTarget:(id)target action:(SEL)action { |
self = [super initWithTarget:target action:action]; |
if (self) { |
- target_.reset([target retain]); |
+ target_ = target; |
action_ = action; |
} |
return self; |
@@ -27,7 +31,10 @@ |
- (void)reset { |
[super reset]; |
+#pragma clang diagnostic push |
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks" |
jif
2017/06/12 18:18:24
Are we OK to live with this?
marq (ping after 24h)
2017/06/12 18:21:47
We don't really have an option, since the compiler
|
[target_ performSelector:action_ withObject:self]; |
+#pragma clang diagnostic pop |
} |
- (void)removeTarget:(id)target action:(SEL)action { |