Prevent further uses of DEFINE_TYPE_CASTS macro
The macro is being phased out in favor of downcast helpers
in t_p/blink/renderer/platform/casting.h. There is still a long
run to fully remove DEFINE_TYPE_CASTS, but this CL aims at
prevent new uses to take place.
CC=jbroman@chromium.org,blink-reviews-vendor@chromium.org
BUG=891908
Change-Id: I7d981d6ff89c956e05b9cb2b5146c14934f6e836
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520978
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#640486}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 8943046..119dfe65 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -208,9 +208,6 @@
_BANNED_CPP_FUNCTIONS = (
- # Make sure that gtest's FRIEND_TEST() macro is not used; the
- # FRIEND_TEST_ALL_PREFIXES() macro from base/gtest_prod_util.h should be
- # used instead since that allows for FLAKY_ and DISABLED_ prefixes.
(
r'\bNULL\b',
(
@@ -219,6 +216,9 @@
True,
(),
),
+ # Make sure that gtest's FRIEND_TEST() macro is not used; the
+ # FRIEND_TEST_ALL_PREFIXES() macro from base/gtest_prod_util.h should be
+ # used instead since that allows for FLAKY_ and DISABLED_ prefixes.
(
'FRIEND_TEST(',
(
@@ -591,6 +591,17 @@
True,
(),
),
+ (
+ 'DEFINE_TYPE_CASTS',
+ (
+ 'DEFINE_TYPE_CASTS is deprecated. Instead, use downcast helpers from ',
+ '//third_party/blink/renderer/platform/casting.h.'
+ ),
+ True,
+ (
+ r'^third_party/blink/renderer/.*\.(cc|h)$',
+ ),
+ ),
)