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

Unified Diff: PRESUBMIT.py

Issue 2940893003: Discourage new use of CallJavascriptFunctionUnsafe() via PRESUBMIT (Closed)
Patch Set: nit Created 3 years, 6 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 55131cdd3acf92ecb39e109ad0d01b73fae0970e..6d09321209f2452fdfd08bb2e8f9668f5834177d 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -368,6 +368,20 @@ _BANNED_CPP_FUNCTIONS = (
False,
(),
),
+ (
+ 'CallJavascriptFunctionUnsafe',
+ (
+ "Don't use CallJavascriptFunctionUnsafe() in new code. Instead, use",
+ 'AllowJavascript(), OnJavascriptAllowed()/OnJavascriptDisallowed(),',
+ 'and CallJavascriptFunction(). See https://goo.gl/qivavq.',
+ ),
+ False,
+ (
+ r'^content[\\\/]browser[\\\/]webui[\\\/]web_ui_impl\.(cc|h)$',
+ r'^content[\\\/]public[\\\/]browser[\\\/]web_ui\.h$',
+ r'^content[\\\/]public[\\\/]test[\\\/]test_web_ui\.(cc|h)$',
+ ),
+ ),
)
« 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