Title: [128820] trunk/Source/WTF
- Revision
- 128820
- Author
- [email protected]
- Date
- 2012-09-17 16:28:44 -0700 (Mon, 17 Sep 2012)
Log Message
The ThreadRescrictionVerifier should be more forcibly disabled on systems that use threads
https://bugs.webkit.org/show_bug.cgi?id=96957
Reviewed by Oliver Hunt.
* wtf/ThreadRestrictionVerifier.h:
(WTF):
(WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
(ThreadRestrictionVerifier):
(WTF::ThreadRestrictionVerifier::setMutexMode):
(WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
(WTF::ThreadRestrictionVerifier::turnOffVerification):
(WTF::ThreadRestrictionVerifier::setShared):
(WTF::ThreadRestrictionVerifier::isSafeToUse):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (128819 => 128820)
--- trunk/Source/WTF/ChangeLog 2012-09-17 23:27:37 UTC (rev 128819)
+++ trunk/Source/WTF/ChangeLog 2012-09-17 23:28:44 UTC (rev 128820)
@@ -1,3 +1,20 @@
+2012-09-17 Filip Pizlo <[email protected]>
+
+ The ThreadRescrictionVerifier should be more forcibly disabled on systems that use threads
+ https://bugs.webkit.org/show_bug.cgi?id=96957
+
+ Reviewed by Oliver Hunt.
+
+ * wtf/ThreadRestrictionVerifier.h:
+ (WTF):
+ (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
+ (ThreadRestrictionVerifier):
+ (WTF::ThreadRestrictionVerifier::setMutexMode):
+ (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
+ (WTF::ThreadRestrictionVerifier::turnOffVerification):
+ (WTF::ThreadRestrictionVerifier::setShared):
+ (WTF::ThreadRestrictionVerifier::isSafeToUse):
+
2012-09-17 Sheriff Bot <[email protected]>
Unreviewed, rolling out r128796.
Modified: trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h (128819 => 128820)
--- trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h 2012-09-17 23:27:37 UTC (rev 128819)
+++ trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h 2012-09-17 23:28:44 UTC (rev 128820)
@@ -47,14 +47,11 @@
// The default mode is to verify that the object will only be used on a single thread. The
// thread gets captured when setShared(true) is called.
// The mode may be changed by calling useMutexMode (or turnOffVerification).
+#if !USE(JSC) // This verifier is completely wrong for _javascript_ implementations that use threads
class ThreadRestrictionVerifier {
public:
ThreadRestrictionVerifier()
-#if USE(JSC)
- : m_mode(NoVerificationMode)
-#else
: m_mode(SingleThreadVerificationMode)
-#endif
, m_shared(false)
, m_owningThread(0)
, m_mutex(0)
@@ -172,7 +169,40 @@
dispatch_queue_t m_owningQueue;
#endif
};
+#else // !USE(JSC) => so the JSC case
+class ThreadRestrictionVerifier {
+public:
+ ThreadRestrictionVerifier()
+ {
+ }
+ void setMutexMode(Mutex&)
+ {
+ }
+
+#if HAVE(DISPATCH_H)
+ void setDispatchQueueMode(dispatch_queue_t)
+ {
+ }
+#endif
+
+ void turnOffVerification()
+ {
+ }
+
+ // Indicates that the object may (or may not) be owned by more than one place.
+ void setShared(bool)
+ {
+ }
+
+ // Is it OK to use the object at this moment on the current thread?
+ bool isSafeToUse() const
+ {
+ return true;
+ }
+};
+#endif
+
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes