Title: [223185] branches/safari-604-branch/Source/WebKit

Diff

Modified: branches/safari-604-branch/Source/WebKit/ChangeLog (223184 => 223185)


--- branches/safari-604-branch/Source/WebKit/ChangeLog	2017-10-11 16:09:31 UTC (rev 223184)
+++ branches/safari-604-branch/Source/WebKit/ChangeLog	2017-10-11 16:09:34 UTC (rev 223185)
@@ -1,5 +1,29 @@
 2017-10-10  Jason Marcell  <[email protected]>
 
+        Cherry-pick r222826. rdar://problem/34792131
+
+    2017-10-03  Brent Fulgham  <[email protected]>
+
+            Correct nullptr dereference during shutdown
+            https://bugs.webkit.org/show_bug.cgi?id=177845
+            <rdar://problem/33651405>
+
+            Reviewed by Chris Dumez.
+
+            It looks like the ResourceLoadStatisticsPersistentStorage destructor is calling code that attempts
+            to use member variables in its owning class (WebResourceLoadStatisticsStore). Since these may have
+            already been destroyed, they are in an invalid state when accessed.
+
+            * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
+            (WebKit::ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage): Do not call
+            finishAllPendingWorkSynchronously() in the destructor, since it relies on the m_memoryStore to be
+            a reference to completely valid object.
+            * UIProcess/WebResourceLoadStatisticsStore.cpp:
+            (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore): Instead, call
+            'finishAllPendingWorkSynchronously' here, when the object is still in a known valid state.
+
+2017-10-10  Jason Marcell  <[email protected]>
+
         Cherry-pick r223084. rdar://problem/34857469
 
     2017-10-09  Jason Marcell  <[email protected]>

Modified: branches/safari-604-branch/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp (223184 => 223185)


--- branches/safari-604-branch/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp	2017-10-11 16:09:31 UTC (rev 223184)
+++ branches/safari-604-branch/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp	2017-10-11 16:09:34 UTC (rev 223185)
@@ -98,7 +98,6 @@
 
 ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage()
 {
-    finishAllPendingWorkSynchronously();
     ASSERT(!m_hasPendingWrite);
 }
 

Modified: branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp (223184 => 223185)


--- branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp	2017-10-11 16:09:31 UTC (rev 223184)
+++ branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp	2017-10-11 16:09:34 UTC (rev 223185)
@@ -173,6 +173,7 @@
 
 WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore()
 {
+    m_persistentStorage.finishAllPendingWorkSynchronously();
 }
     
 void WebResourceLoadStatisticsStore::removeDataRecords()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to