Index: cc/single_thread_proxy.h |
=================================================================== |
--- cc/single_thread_proxy.h (revision 165906) |
+++ cc/single_thread_proxy.h (working copy) |
@@ -91,58 +91,42 @@ |
// code is running on the impl thread to satisfy assertion checks. |
class DebugScopedSetImplThread { |
public: |
- explicit DebugScopedSetImplThread(Proxy* proxy) |
- : m_proxy(proxy) |
+ DebugScopedSetImplThread() |
{ |
#ifndef NDEBUG |
- m_previousValue = m_proxy->m_implThreadIsOverridden; |
- m_proxy->setCurrentThreadIsImplThread(true); |
+ Proxy::setCurrentThreadIsImplThread(true); |
#endif |
} |
~DebugScopedSetImplThread() |
{ |
#ifndef NDEBUG |
- m_proxy->setCurrentThreadIsImplThread(m_previousValue); |
+ Proxy::setCurrentThreadIsImplThread(false); |
#endif |
} |
-private: |
- bool m_previousValue; |
- Proxy* m_proxy; |
}; |
// For use in the single-threaded case. In debug builds, it pretends that the |
// code is running on the main thread to satisfy assertion checks. |
class DebugScopedSetMainThread { |
public: |
- explicit DebugScopedSetMainThread(Proxy* proxy) |
- : m_proxy(proxy) |
+ DebugScopedSetMainThread() |
{ |
#ifndef NDEBUG |
- m_previousValue = m_proxy->m_implThreadIsOverridden; |
- m_proxy->setCurrentThreadIsImplThread(false); |
+ Proxy::setCurrentThreadIsImplThread(false); |
#endif |
} |
~DebugScopedSetMainThread() |
{ |
#ifndef NDEBUG |
- m_proxy->setCurrentThreadIsImplThread(m_previousValue); |
+ Proxy::setCurrentThreadIsImplThread(true); |
#endif |
} |
-private: |
- bool m_previousValue; |
- Proxy* m_proxy; |
}; |
// For use in the single-threaded case. In debug builds, it pretends that the |
// code is running on the impl thread and that the main thread is blocked to |
// satisfy assertion checks |
class DebugScopedSetImplThreadAndMainThreadBlocked { |
-public: |
- explicit DebugScopedSetImplThreadAndMainThreadBlocked(Proxy* proxy) |
- : m_implThread(proxy) |
- , m_mainThreadBlocked(proxy) |
- { |
- } |
private: |
DebugScopedSetImplThread m_implThread; |
DebugScopedSetMainThreadBlocked m_mainThreadBlocked; |