Title: [126379] trunk/Source
- Revision
- 126379
- Author
- [email protected]
- Date
- 2012-08-22 18:33:25 -0700 (Wed, 22 Aug 2012)
Log Message
ThreadRestrictionVerifier should be opt-in, not opt-out
https://bugs.webkit.org/show_bug.cgi?id=94761
Reviewed by Mark Hahnenberg.
../_javascript_Core:
Removed explicit calls to disable the verifier, since it's off by default now.
* parser/SourceProvider.h:
(JSC::SourceProvider::SourceProvider):
(SourceProvider):
* runtime/SymbolTable.h:
(JSC::SharedSymbolTable::SharedSymbolTable):
../WTF:
WebKit's _javascript_ engine supports use on multiple threads, so default-on
is not appropriate for most of our objects, and it causes lots of suprious
assertions.
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocatorHandle::MetaAllocatorHandle): No need to turn off
explicitly, since it's off by default now.
* wtf/ThreadRestrictionVerifier.h:
(WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier): Turn off by default.
(WTF::ThreadRestrictionVerifier::setMutexMode):
(WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
(WTF::ThreadRestrictionVerifier::turnOffVerification): These assertions
about state transitions were inconsistent with each other, and impossible
to maintain with default off, so I removed them.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (126378 => 126379)
--- trunk/Source/_javascript_Core/ChangeLog 2012-08-23 01:28:52 UTC (rev 126378)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-08-23 01:33:25 UTC (rev 126379)
@@ -1,3 +1,18 @@
+2012-08-22 Geoffrey Garen <[email protected]>
+
+ ThreadRestrictionVerifier should be opt-in, not opt-out
+ https://bugs.webkit.org/show_bug.cgi?id=94761
+
+ Reviewed by Mark Hahnenberg.
+
+ Removed explicit calls to disable the verifier, since it's off by default now.
+
+ * parser/SourceProvider.h:
+ (JSC::SourceProvider::SourceProvider):
+ (SourceProvider):
+ * runtime/SymbolTable.h:
+ (JSC::SharedSymbolTable::SharedSymbolTable):
+
2012-08-22 Mark Hahnenberg <[email protected]>
Separate MarkStackThreadSharedData from MarkStack
Modified: trunk/Source/_javascript_Core/parser/SourceProvider.h (126378 => 126379)
--- trunk/Source/_javascript_Core/parser/SourceProvider.h 2012-08-23 01:28:52 UTC (rev 126378)
+++ trunk/Source/_javascript_Core/parser/SourceProvider.h 2012-08-23 01:33:25 UTC (rev 126379)
@@ -49,8 +49,8 @@
, m_cache(cache ? cache : new SourceProviderCache)
, m_cacheOwned(!cache)
{
- turnOffVerifier();
}
+
virtual ~SourceProvider()
{
if (m_cacheOwned)
Modified: trunk/Source/_javascript_Core/runtime/SymbolTable.h (126378 => 126379)
--- trunk/Source/_javascript_Core/runtime/SymbolTable.h 2012-08-23 01:28:52 UTC (rev 126378)
+++ trunk/Source/_javascript_Core/runtime/SymbolTable.h 2012-08-23 01:33:25 UTC (rev 126379)
@@ -330,7 +330,7 @@
public:
static PassRefPtr<SharedSymbolTable> create() { return adoptRef(new SharedSymbolTable); }
private:
- SharedSymbolTable() { turnOffVerifier(); }
+ SharedSymbolTable() { }
};
} // namespace JSC
Modified: trunk/Source/WTF/ChangeLog (126378 => 126379)
--- trunk/Source/WTF/ChangeLog 2012-08-23 01:28:52 UTC (rev 126378)
+++ trunk/Source/WTF/ChangeLog 2012-08-23 01:33:25 UTC (rev 126379)
@@ -1,3 +1,27 @@
+2012-08-22 Geoffrey Garen <[email protected]>
+
+ ThreadRestrictionVerifier should be opt-in, not opt-out
+ https://bugs.webkit.org/show_bug.cgi?id=94761
+
+ Reviewed by Mark Hahnenberg.
+
+ WebKit's _javascript_ engine supports use on multiple threads, so default-on
+ is not appropriate for most of our objects, and it causes lots of suprious
+ assertions.
+
+ * wtf/MetaAllocator.cpp:
+ (WTF::MetaAllocatorHandle::MetaAllocatorHandle): No need to turn off
+ explicitly, since it's off by default now.
+
+ * wtf/ThreadRestrictionVerifier.h:
+ (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier): Turn off by default.
+
+ (WTF::ThreadRestrictionVerifier::setMutexMode):
+ (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
+ (WTF::ThreadRestrictionVerifier::turnOffVerification): These assertions
+ about state transitions were inconsistent with each other, and impossible
+ to maintain with default off, so I removed them.
+
2012-08-22 Allan Sandfeld Jensen <[email protected]>
[Qt] Optionally support smooth-scrolling on all platforms
Modified: trunk/Source/WTF/wtf/MetaAllocator.cpp (126378 => 126379)
--- trunk/Source/WTF/wtf/MetaAllocator.cpp 2012-08-23 01:28:52 UTC (rev 126378)
+++ trunk/Source/WTF/wtf/MetaAllocator.cpp 2012-08-23 01:33:25 UTC (rev 126379)
@@ -79,7 +79,6 @@
ASSERT(allocator);
ASSERT(start);
ASSERT(sizeInBytes);
- turnOffVerifier();
}
MetaAllocatorHandle::~MetaAllocatorHandle()
Modified: trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h (126378 => 126379)
--- trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h 2012-08-23 01:28:52 UTC (rev 126378)
+++ trunk/Source/WTF/wtf/ThreadRestrictionVerifier.h 2012-08-23 01:33:25 UTC (rev 126379)
@@ -50,7 +50,11 @@
class ThreadRestrictionVerifier {
public:
ThreadRestrictionVerifier()
+#if USE(JSC)
+ : m_mode(NoVerificationMode)
+#else
: m_mode(SingleThreadVerificationMode)
+#endif
, m_shared(false)
, m_owningThread(0)
, m_mutex(0)
@@ -70,7 +74,6 @@
void setMutexMode(Mutex& mutex)
{
- ASSERT(m_mode == SingleThreadVerificationMode || (m_mode == MutexVerificationMode && &mutex == m_mutex));
m_mode = MutexVerificationMode;
m_mutex = &mutex;
}
@@ -78,7 +81,6 @@
#if HAVE(DISPATCH_H)
void setDispatchQueueMode(dispatch_queue_t queue)
{
- ASSERT(m_mode == SingleThreadVerificationMode);
m_mode = SingleDispatchQueueVerificationMode;
m_owningQueue = queue;
dispatch_retain(m_owningQueue);
@@ -87,7 +89,6 @@
void turnOffVerification()
{
- ASSERT(m_mode == SingleThreadVerificationMode);
m_mode = NoVerificationMode;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes