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

Unified Diff: PRESUBMIT.py

Issue 2450033004: Add UTF8String to the banned method list. (Closed)
Patch Set: Created 4 years, 2 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: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 1cf31b9c8602784497be3deed13334ef562554b2..cb765c9af43afd9657637186304688e770602f87 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -147,6 +147,15 @@ _BANNED_OBJC_FUNCTIONS = (
),
True,
),
+ (
+ r"/\s+UTF8String\s*]",
+ (
+ 'The use of -[NSString UTF8String] is dangerous as it can return null',
+ 'even if |canBeConvertedToEncoding:NSUTF8StringEncoding| returns YES.',
+ 'Please use |SysNSStringToUTF8| instead.',
+ ),
+ True,
+ ),
)
« 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