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

Unified Diff: net/base/priority_queue.h

Issue 9369045: [net] HostResolverImpl + DnsTransaction + DnsConfigService = Asynchronous DNS ready for experiments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Denitted. Created 8 years, 10 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 | « net/base/net_log_source_type_list.h ('k') | net/dns/async_host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « net/base/net_log_source_type_list.h ('k') | net/dns/async_host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698