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) \ |