Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Unified Diff: third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « third_party/WebKit/Source/wtf/TerminatedArrayBuilder.h ('k') | third_party/WebKit/Source/wtf/ThreadSafeRefCounted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698