OSDN Git Service

JavaScriptCore table, iterators and mutex do not have to be mutable
authorIvailo Monev <xakepa10@laimg.moc>
Thu, 25 Jul 2019 13:58:32 +0000 (13:58 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Thu, 25 Jul 2019 13:58:32 +0000 (13:58 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/3rdparty/javascriptcore/wtf/HashTable.h

index b645187..a45c8a2 100644 (file)
@@ -212,9 +212,9 @@ namespace WTF {
     public:
         // Any modifications of the m_next or m_previous of an iterator that is in a linked list of a HashTable::m_iterator,
         // should be guarded with m_table->m_mutex.
-        mutable const HashTableType* m_table;
-        mutable const_iterator* m_next;
-        mutable const_iterator* m_previous;
+        const HashTableType* m_table;
+        const_iterator* m_next;
+        const_iterator* m_previous;
 #endif
     };
 
@@ -396,8 +396,8 @@ namespace WTF {
 #if CHECK_HASHTABLE_ITERATORS
     public:
         // All access to m_iterators should be guarded with m_mutex.
-        mutable const_iterator* m_iterators;
-        mutable QMutex m_mutex;
+        const_iterator* m_iterators;
+        QMutex m_mutex;
 #endif
     };