| Index: third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h
|
| diff --git a/third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h b/third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h
|
| index cbe2d1371fd419ae4f8a8ef8fd9d8f4223a35437..6cbf344af4dc69bd4118fc7720eec7451f325553 100644
|
| --- a/third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h
|
| +++ b/third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h
|
| @@ -44,44 +44,37 @@ namespace WTF {
|
| // thread gets captured when setShared(true) is called.
|
| // The mode may be changed by calling useMutexMode (or turnOffVerification).
|
| class ThreadRestrictionVerifier {
|
| -public:
|
| - ThreadRestrictionVerifier()
|
| - : m_shared(false)
|
| - , m_owningThread(0)
|
| - {
|
| - }
|
| + public:
|
| + ThreadRestrictionVerifier() : m_shared(false), m_owningThread(0) {}
|
|
|
| - // Indicates that the object may (or may not) be owned by more than one place.
|
| - void setShared(bool shared)
|
| - {
|
| - bool previouslyShared = m_shared;
|
| - m_shared = shared;
|
| + // Indicates that the object may (or may not) be owned by more than one place.
|
| + void setShared(bool shared) {
|
| + bool previouslyShared = m_shared;
|
| + m_shared = shared;
|
|
|
| - if (!m_shared)
|
| - return;
|
| + if (!m_shared)
|
| + return;
|
|
|
| - ASSERT_UNUSED(previouslyShared, shared != previouslyShared);
|
| - // Capture the current thread to verify that subsequent ref/deref happen on this thread.
|
| - m_owningThread = currentThread();
|
| - }
|
| + ASSERT_UNUSED(previouslyShared, shared != previouslyShared);
|
| + // Capture the current thread to verify that subsequent ref/deref happen on this thread.
|
| + m_owningThread = currentThread();
|
| + }
|
|
|
| - // Is it OK to use the object at this moment on the current thread?
|
| - bool isSafeToUse() const
|
| - {
|
| - if (!m_shared)
|
| - return true;
|
| + // Is it OK to use the object at this moment on the current thread?
|
| + bool isSafeToUse() const {
|
| + if (!m_shared)
|
| + return true;
|
|
|
| - return m_owningThread == currentThread();
|
| - }
|
| + return m_owningThread == currentThread();
|
| + }
|
|
|
| -private:
|
| - bool m_shared;
|
| + private:
|
| + bool m_shared;
|
|
|
| - // Used by SingleThreadVerificationMode
|
| - ThreadIdentifier m_owningThread;
|
| + // Used by SingleThreadVerificationMode
|
| + ThreadIdentifier m_owningThread;
|
| };
|
| -
|
| }
|
|
|
| -#endif // ENABLE(ASSERT)
|
| -#endif // ThreadRestrictionVerifier_h
|
| +#endif // ENABLE(ASSERT)
|
| +#endif // ThreadRestrictionVerifier_h
|
|
|