Title: [233423] trunk/Source/WebKit
- Revision
- 233423
- Author
- [email protected]
- Date
- 2018-07-02 08:27:28 -0700 (Mon, 02 Jul 2018)
Log Message
REGRESSION(r233381): Double WebResourceLoadStatisticsStore destructor invocation
https://bugs.webkit.org/show_bug.cgi?id=187247
Reviewed by Chris Dumez.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore):
Don't call postTask() to dispatch this task, as that keeps a reference
to this WebResourceLoadStatisticsStore object and thus causes problems
when invoked from the destructor in the form of a second destructor
invocation that ends up crashing the process. Blocking nature of this
call should be enough to avoid WebResourceLoadStatisticsStore lifetime
issues.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (233422 => 233423)
--- trunk/Source/WebKit/ChangeLog 2018-07-02 14:35:16 UTC (rev 233422)
+++ trunk/Source/WebKit/ChangeLog 2018-07-02 15:27:28 UTC (rev 233423)
@@ -1,3 +1,19 @@
+2018-07-02 Zan Dobersek <[email protected]>
+
+ REGRESSION(r233381): Double WebResourceLoadStatisticsStore destructor invocation
+ https://bugs.webkit.org/show_bug.cgi?id=187247
+
+ Reviewed by Chris Dumez.
+
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore):
+ Don't call postTask() to dispatch this task, as that keeps a reference
+ to this WebResourceLoadStatisticsStore object and thus causes problems
+ when invoked from the destructor in the form of a second destructor
+ invocation that ends up crashing the process. Blocking nature of this
+ call should be enough to avoid WebResourceLoadStatisticsStore lifetime
+ issues.
+
2018-07-02 Per Arne Vollan <[email protected]>
Delete display link when closing page or the WebContent process has crashed.
Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp (233422 => 233423)
--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp 2018-07-02 14:35:16 UTC (rev 233422)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp 2018-07-02 15:27:28 UTC (rev 233423)
@@ -157,9 +157,11 @@
return;
// 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.
+ // synchronously since it has a C++ reference to us. Blocking nature of this task allows us
+ // to not maintain a WebResourceLoadStatisticsStore reference for the duration of dispatch,
+ // avoiding double-deletion issues when this is invoked from the destructor.
BinarySemaphore semaphore;
- postTask([&semaphore, this] {
+ m_statisticsQueue->dispatch([&semaphore, this] {
m_persistentStorage = nullptr;
m_memoryStore = nullptr;
semaphore.signal();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes