Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: ios/clean/chrome/browser/ui/context_menu/context_menu_view_controller.mm

Issue 2922573002: [iOS Clean] Ignore compiler warnings for |-performSelector:withObject:|. (Closed)
Patch Set: added comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/context_menu/context_menu_view_controller.mm
diff --git a/ios/clean/chrome/browser/ui/context_menu/context_menu_view_controller.mm b/ios/clean/chrome/browser/ui/context_menu/context_menu_view_controller.mm
index d1d120a79866e35e1cdf9bcc43c2e2170db9c7f7..441ae48780bba54e75df8b53e2be38aadfccd2a3 100644
--- a/ios/clean/chrome/browser/ui/context_menu/context_menu_view_controller.mm
+++ b/ios/clean/chrome/browser/ui/context_menu/context_menu_view_controller.mm
@@ -20,11 +20,16 @@ void DispatchContextMenuCommands(const std::vector<SEL>& commands,
ContextMenuContext* context) {
DCHECK(dispatcher);
DCHECK(context);
+// |-performSelector:withObject:| throws a warning in ARC because the compiler
+// doesn't know how to handle the memory management of the returned values.
+// Since all ContextMenuCommands return void, these warning can be ignored
+// here.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
for (SEL command : commands) {
- IMP command_imp = [dispatcher methodForSelector:command];
- DCHECK(command_imp);
- command_imp(dispatcher, command, context);
+ [dispatcher performSelector:command withObject:context];
}
+#pragma clang diagnostic pop
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698