Index: net/base/priority_queue.h |
diff --git a/net/base/priority_queue.h b/net/base/priority_queue.h |
index 037faed86b201db0e89618655aeb67a87d9431f0..f60b88c69a05319958ae80eb97db603cda350484 100644 |
--- a/net/base/priority_queue.h |
+++ b/net/base/priority_queue.h |
@@ -47,7 +47,11 @@ class PriorityQueue : public base::NonThreadSafe { |
class Pointer { |
public: |
// Constructs a null pointer. |
- Pointer() : priority_(kNullPriority) {} |
+ Pointer() : priority_(kNullPriority) { |
+#if !defined(NDEBUG) |
+ id_ = static_cast<size_t>(-1); |
+#endif |
+ } |
bool is_null() const { return priority_ == kNullPriority; } |
@@ -64,6 +68,10 @@ class PriorityQueue : public base::NonThreadSafe { |
return (priority_ == other.priority_) && (iterator_ == other.iterator_); |
} |
+ void Reset() { |
+ *this = Pointer(); |
+ } |
+ |
private: |
friend class PriorityQueue; |