diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 21:26:41 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 21:26:41 +0000 |
commit | 767f38d72c2e7da043b597eba26a718af08f9035 (patch) | |
tree | 442727383f1b535488df605bcf1113afee9682b7 /cc/trees/proxy.h | |
parent | 9d11b52c42b6dc9ed9dd937b06a024f88bbee19c (diff) | |
download | chromium_src-767f38d72c2e7da043b597eba26a718af08f9035.zip chromium_src-767f38d72c2e7da043b597eba26a718af08f9035.tar.gz chromium_src-767f38d72c2e7da043b597eba26a718af08f9035.tar.bz2 |
cc: Change #if !defined(NDEBUG) to #if DCHECK_IS_ON.
Some places in cc enabled DCHECK code only when in a debug build since
they added member variables to classes in order to perform their
checks, and we could not check for DCHECK at compile time.
Since we can now, we can guard these DCHECKS with DCHECK_IS_ON. Yay!
DCHECK_IS_ON is always defined by base/logging.h. It is set to 1 when
DCHECKS are enabled, and 0 otherwise.
R=enne
BUG=350462
Review URL: https://codereview.chromium.org/201843005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/proxy.h')
-rw-r--r-- | cc/trees/proxy.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h index e987690..4ec4f6e 100644 --- a/cc/trees/proxy.h +++ b/cc/trees/proxy.h @@ -39,7 +39,7 @@ class CC_EXPORT Proxy { bool IsMainThread() const; bool IsImplThread() const; bool IsMainThreadBlocked() const; -#ifndef NDEBUG +#if DCHECK_IS_ON void SetMainThreadBlocked(bool is_main_thread_blocked); void SetCurrentThreadIsImplThread(bool is_impl_thread); #endif @@ -112,7 +112,7 @@ class CC_EXPORT Proxy { private: scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; -#ifndef NDEBUG +#if DCHECK_IS_ON bool impl_thread_is_overridden_; bool is_main_thread_blocked_; #endif @@ -120,7 +120,7 @@ class CC_EXPORT Proxy { DISALLOW_COPY_AND_ASSIGN(Proxy); }; -#ifndef NDEBUG +#if DCHECK_IS_ON class DebugScopedSetMainThreadBlocked { public: explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) : proxy_(proxy) { |