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

Unified Diff: Source/core/dom/Node.h

Issue 27459002: Move DEFINE_TYPE_CASTS from Node.h to Assertions.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 | Source/wtf/Assertions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index bfb6cb876255d381610d57cb4b7a3e6ee6df634b..deec415fe62e49ffa69e3fc77adf57d4615667e6 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -931,31 +931,6 @@ inline bool operator!=(const Node& a, const Node& b) { return !(a == b); }
inline bool operator!=(const Node& a, const Node* b) { return !(a == b); }
inline bool operator!=(const Node* a, const Node& b) { return !(a == b); }
-// FIXME: Move to more generic place.
-#define DEFINE_TYPE_CASTS(thisType, argumentType, argumentName, pointerPredicate, referencePredicate) \
-inline thisType* to##thisType(argumentType* argumentName) \
-{ \
- ASSERT_WITH_SECURITY_IMPLICATION(!argumentName || (pointerPredicate)); \
- return static_cast<thisType*>(argumentName); \
-} \
-inline const thisType* to##thisType(const argumentType* argumentName) \
-{ \
- ASSERT_WITH_SECURITY_IMPLICATION(!argumentName || (pointerPredicate)); \
- return static_cast<const thisType*>(argumentName); \
-} \
-inline thisType& to##thisType(argumentType& argumentName) \
-{ \
- ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
- return static_cast<thisType&>(argumentName); \
-} \
-inline const thisType& to##thisType(const argumentType& argumentName) \
-{ \
- ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
- return static_cast<const thisType&>(argumentName); \
-} \
-void to##thisType(const thisType*); \
-void to##thisType(const thisType&)
-
#define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \
DEFINE_TYPE_CASTS(thisType, Node, node, node->predicate, node.predicate)
« no previous file with comments | « no previous file | Source/wtf/Assertions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698