Title: [219838] trunk/Source/WebKit
Revision
219838
Author
[email protected]
Date
2017-07-24 14:42:51 -0700 (Mon, 24 Jul 2017)

Log Message

Unreviewed, rolling out r219828.

Causes debug assertions to be hit on iOS

Reverted changeset:

"Fix lifetime management issue in
ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()"
https://bugs.webkit.org/show_bug.cgi?id=174790
http://trac.webkit.org/changeset/219828

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (219837 => 219838)


--- trunk/Source/WebKit/ChangeLog	2017-07-24 21:21:06 UTC (rev 219837)
+++ trunk/Source/WebKit/ChangeLog	2017-07-24 21:42:51 UTC (rev 219838)
@@ -1,3 +1,16 @@
+2017-07-24  Chris Dumez  <[email protected]>
+
+        Unreviewed, rolling out r219828.
+
+        Causes debug assertions to be hit on iOS
+
+        Reverted changeset:
+
+        "Fix lifetime management issue in
+        ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()"
+        https://bugs.webkit.org/show_bug.cgi?id=174790
+        http://trac.webkit.org/changeset/219828
+
 2017-07-24  Michael Catanzaro  <[email protected]>
 
         [GTK][WPE] Stop using AutodrainedPool in IconDatabase

Modified: trunk/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp (219837 => 219838)


--- trunk/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp	2017-07-24 21:21:06 UTC (rev 219837)
+++ trunk/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp	2017-07-24 21:42:51 UTC (rev 219838)
@@ -83,8 +83,7 @@
 }
 
 ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage(WebResourceLoadStatisticsStore& store, const String& storageDirectoryPath)
-    : m_weakPtrFactory(this)
-    , m_memoryStore(store)
+    : m_memoryStore(store)
     , m_storageDirectoryPath(storageDirectoryPath)
 {
 }
@@ -281,10 +280,8 @@
         if (!m_hasPendingWrite) {
             m_hasPendingWrite = true;
             Seconds delay = minimumWriteInterval - timeSinceLastWrite + 1_s;
-            // WorkQueue::dispatchAfter() keeps the WorkQueue alive so the dispatched lambda may get executed after the store has been destroyed.
-            m_memoryStore.statisticsQueue().dispatchAfter(delay, [weakThis = createWeakPtr()] () mutable {
-                if (weakThis)
-                    weakThis->writeMemoryStoreToDisk();
+            m_memoryStore.statisticsQueue().dispatchAfter(delay, [this] () mutable {
+                writeMemoryStoreToDisk();
             });
         }
         return;

Modified: trunk/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h (219837 => 219838)


--- trunk/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h	2017-07-24 21:21:06 UTC (rev 219837)
+++ trunk/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h	2017-07-24 21:42:51 UTC (rev 219838)
@@ -28,7 +28,6 @@
 #include <wtf/Forward.h>
 #include <wtf/MonotonicTime.h>
 #include <wtf/WallTime.h>
-#include <wtf/WeakPtr.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -63,9 +62,6 @@
     void excludeFromBackup() const;
     void refreshMemoryStoreFromDisk();
 
-    WeakPtr<ResourceLoadStatisticsPersistentStorage> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
-
-    WeakPtrFactory<ResourceLoadStatisticsPersistentStorage> m_weakPtrFactory;
     WebResourceLoadStatisticsStore& m_memoryStore;
     const String m_storageDirectoryPath;
     std::unique_ptr<WebCore::FileMonitor> m_fileMonitor;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to