summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-11-04 14:47:16 -0800
committerNico Weber <thakis@chromium.org>2015-11-04 22:48:35 +0000
commitd380128613ba8ad96b3e9c65c06d4b4fe570bf85 (patch)
treedb593c4d38e972b23c5768d896b8dd4161b16c20
parentc46d2c6e07b82c69e3727ad947a2fede1b3793e6 (diff)
downloadchromium_src-d380128613ba8ad96b3e9c65c06d4b4fe570bf85.zip
chromium_src-d380128613ba8ad96b3e9c65c06d4b4fe570bf85.tar.gz
chromium_src-d380128613ba8ad96b3e9c65c06d4b4fe570bf85.tar.bz2
ios: Stop using __weak.
Since we don't build with ARC enabled and without garbage collection, __weak had no semantic meaning. Upstream clang wants to change __weak to have ARC zeroing weak references semantics, but to not silently change behavior, they're first making it an error to use __weak without ARC. Replace __weak with comments so we can update compilers. Also remove a workaround that's no longer necessary. Similar to https://codereview.chromium.org/1407103008/ on OS X. BUG=550066,228650 R=stuartmorgan@chromium.org TBR=thestig Review URL: https://codereview.chromium.org/1424713006 . Cr-Commit-Position: refs/heads/master@{#357920}
-rw-r--r--base/ios/crb_protocol_observers_unittest.mm2
-rw-r--r--components/autofill/ios/browser/form_suggestion.mm6
-rw-r--r--ios/chrome/browser/autofill/form_suggestion_controller.mm2
-rw-r--r--ios/chrome/browser/infobars/confirm_infobar_controller.mm2
-rw-r--r--ios/chrome/browser/translate/after_translate_infobar_controller.mm2
-rw-r--r--ios/chrome/browser/translate/before_translate_infobar_controller.mm4
-rw-r--r--ios/net/crn_http_protocol_handler.mm2
-rw-r--r--ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm4
-rw-r--r--ios/web/crw_browsing_data_store_unittest.mm2
-rw-r--r--ios/web/navigation/crw_session_controller.mm2
-rw-r--r--ios/web/web_state/ui/crw_touch_tracking_recognizer.mm2
11 files changed, 12 insertions, 18 deletions
diff --git a/base/ios/crb_protocol_observers_unittest.mm b/base/ios/crb_protocol_observers_unittest.mm
index b8cf423..07f5cff 100644
--- a/base/ios/crb_protocol_observers_unittest.mm
+++ b/base/ios/crb_protocol_observers_unittest.mm
@@ -255,7 +255,7 @@ TEST_F(CRBProtocolObserversTest, NestedMutateObservers) {
@end
@implementation TestMutateObserver {
- __weak id _observers;
+ id _observers; // weak
}
- (instancetype)initWithObserver:(CRBProtocolObservers*)observers {
diff --git a/components/autofill/ios/browser/form_suggestion.mm b/components/autofill/ios/browser/form_suggestion.mm
index 4f5b85a..709bb63 100644
--- a/components/autofill/ios/browser/form_suggestion.mm
+++ b/components/autofill/ios/browser/form_suggestion.mm
@@ -5,17 +5,11 @@
#import "components/autofill/ios/browser/form_suggestion.h"
@interface FormSuggestion ()
-// TODO(rohitrao): These properties must be redefined readwrite to work around a
-// clang bug. crbug.com/228650
-@property(copy, readwrite) NSString* value;
-@property(copy, readwrite) NSString* icon;
-
// Local initializer for a FormSuggestion.
- (id)initWithValue:(NSString*)value
displayDescription:(NSString*)displayDescription
icon:(NSString*)icon
identifier:(NSInteger)identifier;
-
@end
@implementation FormSuggestion {
diff --git a/ios/chrome/browser/autofill/form_suggestion_controller.mm b/ios/chrome/browser/autofill/form_suggestion_controller.mm
index 04ad0d1..84201e5 100644
--- a/ios/chrome/browser/autofill/form_suggestion_controller.mm
+++ b/ios/chrome/browser/autofill/form_suggestion_controller.mm
@@ -91,7 +91,7 @@ AutofillSuggestionState::AutofillSuggestionState(const std::string& form_name,
base::scoped_nsobject<JsSuggestionManager> _jsSuggestionManager;
// The provider for the current set of suggestions.
- __weak id<FormSuggestionProvider> _provider;
+ id<FormSuggestionProvider> _provider; // weak
}
- (instancetype)initWithWebState:(web::WebState*)webState
diff --git a/ios/chrome/browser/infobars/confirm_infobar_controller.mm b/ios/chrome/browser/infobars/confirm_infobar_controller.mm
index 90f53a8..f887d84 100644
--- a/ios/chrome/browser/infobars/confirm_infobar_controller.mm
+++ b/ios/chrome/browser/infobars/confirm_infobar_controller.mm
@@ -48,7 +48,7 @@ ConfirmInfoBarDelegate::InfoBarButton UITagToButton(NSUInteger tag) {
@end
@implementation ConfirmInfoBarController {
- __weak ConfirmInfoBarDelegate* confirmInfobarDelegate_;
+ ConfirmInfoBarDelegate* confirmInfobarDelegate_; // weak
}
#pragma mark -
diff --git a/ios/chrome/browser/translate/after_translate_infobar_controller.mm b/ios/chrome/browser/translate/after_translate_infobar_controller.mm
index 4d7516f..2ae014e 100644
--- a/ios/chrome/browser/translate/after_translate_infobar_controller.mm
+++ b/ios/chrome/browser/translate/after_translate_infobar_controller.mm
@@ -17,7 +17,7 @@
#include "ui/gfx/image/image.h"
@interface AfterTranslateInfoBarController () {
- __weak translate::TranslateInfoBarDelegate* _translateInfoBarDelegate;
+ translate::TranslateInfoBarDelegate* _translateInfoBarDelegate; // weak
}
// Action for any of the user defined buttons.
diff --git a/ios/chrome/browser/translate/before_translate_infobar_controller.mm b/ios/chrome/browser/translate/before_translate_infobar_controller.mm
index 7a872d9..c2588d2 100644
--- a/ios/chrome/browser/translate/before_translate_infobar_controller.mm
+++ b/ios/chrome/browser/translate/before_translate_infobar_controller.mm
@@ -31,7 +31,7 @@ NSTimeInterval kPickerAnimationDurationInSeconds = 0.2;
// language list.
@interface LanguagePickerController
: UIViewController<UIPickerViewDataSource, UIPickerViewDelegate> {
- __weak translate::TranslateInfoBarDelegate* _translateInfoBarDelegate;
+ translate::TranslateInfoBarDelegate* _translateInfoBarDelegate; // weak
NSInteger _initialRow; // Displayed in bold font.
NSInteger _disabledRow; // Grayed out.
}
@@ -107,7 +107,7 @@ NSTimeInterval kPickerAnimationDurationInSeconds = 0.2;
@end
@implementation BeforeTranslateInfoBarController {
- __weak translate::TranslateInfoBarDelegate* _translateInfoBarDelegate;
+ translate::TranslateInfoBarDelegate* _translateInfoBarDelegate; // weak
// A fullscreen view that catches all touch events and contains a UIPickerView
// and a UINavigationBar.
base::scoped_nsobject<UIView> _languageSelectionView;
diff --git a/ios/net/crn_http_protocol_handler.mm b/ios/net/crn_http_protocol_handler.mm
index e5479ce..ba7ca57 100644
--- a/ios/net/crn_http_protocol_handler.mm
+++ b/ios/net/crn_http_protocol_handler.mm
@@ -55,7 +55,7 @@ void DoNothing(bool flag) {}
@interface CRWHTTPStreamDelegate : NSObject<NSStreamDelegate> {
@private
// The object is owned by |_core| and has a weak reference to it.
- __weak net::HttpProtocolHandlerCore* _core;
+ net::HttpProtocolHandlerCore* _core; // weak
}
- (instancetype)initWithHttpProtocolHandlerCore:
(net::HttpProtocolHandlerCore*)core;
diff --git a/ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm b/ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm
index d6b99b0..392b606 100644
--- a/ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm
+++ b/ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm
@@ -22,11 +22,11 @@
// as described by the item above.
@interface CRNHTTPProtocolHandlerProxyWithClientThread () {
- __weak NSURLProtocol* _protocol;
+ NSURLProtocol* _protocol; // weak
// Thread used to call the client back.
// This thread does not have a base::MessageLoop, and thus does not work with
// the usual task posting functions.
- __weak NSThread* _clientThread;
+ NSThread* _clientThread; // weak
// The run loop modes to use when posting tasks to |clientThread_|.
base::scoped_nsobject<NSArray> _runLoopModes;
// The request URL.
diff --git a/ios/web/crw_browsing_data_store_unittest.mm b/ios/web/crw_browsing_data_store_unittest.mm
index f3b2bfe..2d5f800 100644
--- a/ios/web/crw_browsing_data_store_unittest.mm
+++ b/ios/web/crw_browsing_data_store_unittest.mm
@@ -32,7 +32,7 @@
@implementation CRWTestBrowsingDataStoreObserver {
// The underlying CRWBrowsingDataStore.
- __weak CRWBrowsingDataStore* _browsingDataStore;
+ CRWBrowsingDataStore* _browsingDataStore; // weak
}
@synthesize modeChangeCount = _modeChangeCount;
diff --git a/ios/web/navigation/crw_session_controller.mm b/ios/web/navigation/crw_session_controller.mm
index 5d67cb5..21e3d872 100644
--- a/ios/web/navigation/crw_session_controller.mm
+++ b/ios/web/navigation/crw_session_controller.mm
@@ -91,7 +91,7 @@ NSString* const kXCallbackParametersKey = @"xCallbackParameters";
BOOL _useDesktopUserAgentForNextPendingEntry;
// The browser state associated with this CRWSessionController;
- __weak web::BrowserState* _browserState;
+ web::BrowserState* _browserState; // weak
// Time smoother for navigation entry timestamps; see comment in
// navigation_controller_impl.h
diff --git a/ios/web/web_state/ui/crw_touch_tracking_recognizer.mm b/ios/web/web_state/ui/crw_touch_tracking_recognizer.mm
index 4803253..0b93d0d 100644
--- a/ios/web/web_state/ui/crw_touch_tracking_recognizer.mm
+++ b/ios/web/web_state/ui/crw_touch_tracking_recognizer.mm
@@ -5,7 +5,7 @@
#import "ios/web/web_state/ui/crw_touch_tracking_recognizer.h"
@interface CRWTouchTrackingRecognizer () <UIGestureRecognizerDelegate> {
- __weak id<CRWTouchTrackingDelegate> _delegate;
+ id<CRWTouchTrackingDelegate> _delegate; // weak
}
@end