summaryrefslogtreecommitdiffstats
path: root/cc/trees/proxy.h
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2015-01-08 15:35:58 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-08 23:37:17 +0000
commite649f573a38b00bb20fe0925098251a4ff184566 (patch)
tree6f400822726e85def4cad5a1ee704e232a6364ad /cc/trees/proxy.h
parent95bc5b1779dcf8e4a9e37ef600c0ea76293307e3 (diff)
downloadchromium_src-e649f573a38b00bb20fe0925098251a4ff184566.zip
chromium_src-e649f573a38b00bb20fe0925098251a4ff184566.tar.gz
chromium_src-e649f573a38b00bb20fe0925098251a4ff184566.tar.bz2
base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON().
This ensures that if the header is not included, and a DCHECK is guarded by this check, that the file will fail to compile instead of silently compiling the DCHECK out. For example: #if DCHECK_IS_ON DCHECK(SomeThing()); #endif This example would be compiled out if DCHECK_IS_ON was not defined due to not including the logging.h header. Instead, this will fail to compile: #if DCHECK_IS_ON() DCHECK(SomeThing()); #endif R=thakis@chromium.org Review URL: https://codereview.chromium.org/842523002 Cr-Commit-Position: refs/heads/master@{#310626}
Diffstat (limited to 'cc/trees/proxy.h')
-rw-r--r--cc/trees/proxy.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h
index e07e9a2..206af66 100644
--- a/cc/trees/proxy.h
+++ b/cc/trees/proxy.h
@@ -46,7 +46,7 @@ class CC_EXPORT Proxy {
bool IsMainThread() const;
bool IsImplThread() const;
bool IsMainThreadBlocked() const;
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
void SetMainThreadBlocked(bool is_main_thread_blocked);
void SetCurrentThreadIsImplThread(bool is_impl_thread);
#endif
@@ -127,7 +127,7 @@ class CC_EXPORT Proxy {
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_;
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
const base::PlatformThreadId main_thread_id_;
bool impl_thread_is_overridden_;
bool is_main_thread_blocked_;
@@ -136,7 +136,7 @@ class CC_EXPORT Proxy {
DISALLOW_COPY_AND_ASSIGN(Proxy);
};
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
class DebugScopedSetMainThreadBlocked {
public:
explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) : proxy_(proxy) {