Chromium Code Reviews| Index: cc/proxy.h |
| diff --git a/cc/proxy.h b/cc/proxy.h |
| index d9d5bd3108678eef3a319a343e0123cd6c437dc6..65680e321e196d9187d44917eb69d5d137181a84 100644 |
| --- a/cc/proxy.h |
| +++ b/cc/proxy.h |
| @@ -117,26 +117,30 @@ private: |
| #endif |
| }; |
| +#ifndef NDEBUG |
| class DebugScopedSetMainThreadBlocked { |
| public: |
| explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) |
| : m_proxy(proxy) |
|
danakj
2012/11/21 20:23:59
Just #ifndef around this and the private variable
piman
2012/11/21 20:44:06
If you prefer, but I found that this version was a
danakj
2012/11/21 20:52:23
Ah, right. I had noticed the parameter in the #els
|
| { |
| -#ifndef NDEBUG |
| DCHECK(!m_proxy->isMainThreadBlocked()); |
| m_proxy->setMainThreadBlocked(true); |
| -#endif |
| } |
| ~DebugScopedSetMainThreadBlocked() |
| { |
| -#ifndef NDEBUG |
| DCHECK(m_proxy->isMainThreadBlocked()); |
| m_proxy->setMainThreadBlocked(false); |
| -#endif |
| } |
| private: |
| Proxy* m_proxy; |
| }; |
| +#else |
| +class DebugScopedSetMainThreadBlocked { |
| +public: |
| + explicit DebugScopedSetMainThreadBlocked(Proxy*) { } |
| + ~DebugScopedSetMainThreadBlocked() { } |
| +}; |
| +#endif |
| } |