Title: [248401] trunk/Source/WebKit
Revision
248401
Author
[email protected]
Date
2019-08-07 20:31:40 -0700 (Wed, 07 Aug 2019)

Log Message

Turn some ITP threading ASSERTs into RELEASE_ASSERTs
https://bugs.webkit.org/show_bug.cgi?id=200521

Reviewed by Ryosuke Niwa.

Turn some ITP threading ASSERTs into RELEASE_ASSERTs to help catch more bugs.

* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore):
(WebKit::ResourceLoadStatisticsMemoryStore::isEmpty const):
* NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
(WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
(WebKit::ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (248400 => 248401)


--- trunk/Source/WebKit/ChangeLog	2019-08-08 02:36:33 UTC (rev 248400)
+++ trunk/Source/WebKit/ChangeLog	2019-08-08 03:31:40 UTC (rev 248401)
@@ -1,3 +1,23 @@
+2019-08-07  Chris Dumez  <[email protected]>
+
+        Turn some ITP threading ASSERTs into RELEASE_ASSERTs
+        https://bugs.webkit.org/show_bug.cgi?id=200521
+
+        Reviewed by Ryosuke Niwa.
+
+        Turn some ITP threading ASSERTs into RELEASE_ASSERTs to help catch more bugs.
+
+        * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
+        (WebKit::ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore):
+        (WebKit::ResourceLoadStatisticsMemoryStore::isEmpty const):
+        * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
+        (WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
+        (WebKit::ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage):
+        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
+        (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
+        (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
+        (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore):
+
 2019-08-07  Kate Cheney  <[email protected]>
 
         Adopt non-deprecated CGColorSpace API

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp (248400 => 248401)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp	2019-08-08 02:36:33 UTC (rev 248400)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp	2019-08-08 03:31:40 UTC (rev 248401)
@@ -72,7 +72,7 @@
 ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore(WebResourceLoadStatisticsStore& store, WorkQueue& workQueue, ShouldIncludeLocalhost shouldIncludeLocalhost)
     : ResourceLoadStatisticsStore(store, workQueue, shouldIncludeLocalhost)
 {
-    ASSERT(!RunLoop::isMain());
+    RELEASE_ASSERT(!RunLoop::isMain());
 
     workQueue.dispatchAfter(5_s, [weakThis = makeWeakPtr(*this)] {
         if (weakThis)
@@ -82,7 +82,7 @@
 
 bool ResourceLoadStatisticsMemoryStore::isEmpty() const
 {
-    ASSERT(!RunLoop::isMain());
+    RELEASE_ASSERT(!RunLoop::isMain());
 
     return m_resourceStatisticsMap.isEmpty();
 }

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp (248400 => 248401)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp	2019-08-08 02:36:33 UTC (rev 248400)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp	2019-08-08 03:31:40 UTC (rev 248401)
@@ -60,7 +60,7 @@
     , m_workQueue(workQueue)
     , m_storageDirectoryPath(storageDirectoryPath)
 {
-    ASSERT(!RunLoop::isMain());
+    RELEASE_ASSERT(!RunLoop::isMain());
 
     m_memoryStore.setPersistentStorage(*this);
 
@@ -70,7 +70,7 @@
 
 ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage()
 {
-    ASSERT(!RunLoop::isMain());
+    RELEASE_ASSERT(!RunLoop::isMain());
 
     if (m_hasPendingWrite)
         writeMemoryStoreToDisk();

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (248400 => 248401)


--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-08-08 02:36:33 UTC (rev 248400)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-08-08 03:31:40 UTC (rev 248401)
@@ -155,7 +155,7 @@
     , m_statisticsQueue(WorkQueue::create("WebResourceLoadStatisticsStore Process Data Queue", WorkQueue::Type::Serial, WorkQueue::QOS::Utility))
     , m_dailyTasksTimer(RunLoop::main(), this, &WebResourceLoadStatisticsStore::performDailyTasks)
 {
-    ASSERT(RunLoop::isMain());
+    RELEASE_ASSERT(RunLoop::isMain());
     
     postTask([this, resourceLoadStatisticsDirectory = resourceLoadStatisticsDirectory.isolatedCopy(), shouldIncludeLocalhost] {
         if (RuntimeEnabledFeatures::sharedFeatures().isITPDatabaseEnabled()) {
@@ -179,9 +179,9 @@
 
 WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore()
 {
-    ASSERT(RunLoop::isMain());
-    ASSERT(!m_statisticsStore);
-    ASSERT(!m_persistentStorage);
+    RELEASE_ASSERT(RunLoop::isMain());
+    RELEASE_ASSERT(!m_statisticsStore);
+    RELEASE_ASSERT(!m_persistentStorage);
 }
 
 void WebResourceLoadStatisticsStore::didDestroyNetworkSession()
@@ -208,7 +208,7 @@
 
 void WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore()
 {
-    ASSERT(RunLoop::isMain());
+    RELEASE_ASSERT(RunLoop::isMain());
 
     // Make sure we destroy the persistent store on the background queue and wait for it to die
     // synchronously since it has a C++ reference to us. Blocking nature of this task allows us
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to