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

Unified Diff: third_party/WebKit/Source/wtf/RefCounted.h

Issue 2714703002: Avoid needless InstanceCounter.h inclusion. (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/RefCounted.h
diff --git a/third_party/WebKit/Source/wtf/RefCounted.h b/third_party/WebKit/Source/wtf/RefCounted.h
index a4847efec651500b1c6776b8b3183b0ea5537421..a2820eaa4d421d41296fb052975af7e46b1fc2b6 100644
--- a/third_party/WebKit/Source/wtf/RefCounted.h
+++ b/third_party/WebKit/Source/wtf/RefCounted.h
@@ -23,10 +23,13 @@
#include "wtf/Allocator.h"
#include "wtf/Assertions.h"
-#include "wtf/InstanceCounter.h"
#include "wtf/Noncopyable.h"
#include "wtf/WTFExport.h"
+#if ENABLE(INSTANCE_COUNTER)
+#include "wtf/InstanceCounter.h"
+#endif
+
#if DCHECK_IS_ON()
#define CHECK_REF_COUNTED_LIFECYCLE 1
#include "wtf/ThreadRestrictionVerifier.h"
@@ -152,7 +155,7 @@ class RefCounted : public RefCountedBase {
}
protected:
-#ifdef ENABLE_INSTANCE_COUNTER
+#if ENABLE(INSTANCE_COUNTER)
RefCounted() { incrementInstanceCount<T>(static_cast<T*>(this)); }
~RefCounted() { decrementInstanceCount<T>(static_cast<T*>(this)); }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698