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

Unified Diff: Source/wtf/Assertions.h

Issue 313813002: Oilpan: Replace RefPtrs to Node and its subclasses in core/dom/ with Oilpan transtion types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« Source/platform/heap/Handle.h ('K') | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Assertions.h
diff --git a/Source/wtf/Assertions.h b/Source/wtf/Assertions.h
index ca91dd2bcf039897f93153a6b7e186ac617cf999..b82208141de1c3c121a87135bfca7ba0ecb9b125 100644
--- a/Source/wtf/Assertions.h
+++ b/Source/wtf/Assertions.h
@@ -380,6 +380,12 @@ static inline void UNREACHABLE_FOR_PLATFORM()
inline bool operator!=(const PassRefPtr<thisType>& a, const thisType& b) { return !(a == b); } \
inline bool operator!=(const thisType& a, const PassRefPtr<thisType>& b) { return !(a == b); }
+#define DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_RAWPTR(thisType) \
+ inline bool operator==(const RawPtr<thisType>& a, const thisType& b) { return a.get() == &b; } \
Mads Ager (chromium) 2014/06/04 09:27:26 This is in line with what is being done now, so ju
Erik Corry 2014/06/04 09:35:47 I agree that the need for this indicates we are us
tkent 2014/06/05 00:22:27 As you know, it's off-topic. I don't think we hav
+ inline bool operator==(const thisType& a, const RawPtr<thisType>& b) { return &a == b.get(); } \
+ inline bool operator!=(const RawPtr<thisType>& a, const thisType& b) { return !(a == b); } \
+ inline bool operator!=(const thisType& a, const RawPtr<thisType>& b) { return !(a == b); }
+
/* DEFINE_TYPE_CASTS */
#define DEFINE_TYPE_CASTS(thisType, argumentType, argumentName, pointerPredicate, referencePredicate) \
« Source/platform/heap/Handle.h ('K') | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698