Title: [280740] trunk
- Revision
- 280740
- Author
- [email protected]
- Date
- 2021-08-06 15:18:49 -0700 (Fri, 06 Aug 2021)
Log Message
ASSERTION FAILED: !m_networkLoad in NetworkResourceLoader::~NetworkResourceLoader()
https://bugs.webkit.org/show_bug.cgi?id=228853
Reviewed by Alex Christensen.
Source/WebKit:
~NetworkResourceLoader() had the assertion ensuring m_networkLoad
was empty. But, this could fail in the following scenario. If a
'keepalive' fetch request is not finished and the page is
navigated away, its NetworkResourceLoader is transferred to the
NetworkSession by NetworkConnectionToWebProcess::transferKeptAliveLoad.
And, before the request is finished, if the NetworkSession is
destroyed, the kept alive NetworkResourceLoader is destroyed.
Test: http/tests/fetch/keepalive-fetch.html
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::~NetworkSession): Abort m_keptAliveLoads.
LayoutTests:
* http/tests/fetch/keepalive-fetch-expected.txt: Added.
* http/tests/fetch/keepalive-fetch.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (280739 => 280740)
--- trunk/LayoutTests/ChangeLog 2021-08-06 22:16:34 UTC (rev 280739)
+++ trunk/LayoutTests/ChangeLog 2021-08-06 22:18:49 UTC (rev 280740)
@@ -1,3 +1,13 @@
+2021-08-06 Fujii Hironori <[email protected]>
+
+ ASSERTION FAILED: !m_networkLoad in NetworkResourceLoader::~NetworkResourceLoader()
+ https://bugs.webkit.org/show_bug.cgi?id=228853
+
+ Reviewed by Alex Christensen.
+
+ * http/tests/fetch/keepalive-fetch-expected.txt: Added.
+ * http/tests/fetch/keepalive-fetch.html: Added.
+
2021-08-06 Arcady Goldmints-Orlov <[email protected]>
[GTK] Mark some WPT CSS tests as still failing on GTK
Added: trunk/LayoutTests/http/tests/fetch/keepalive-fetch-expected.txt (0 => 280740)
--- trunk/LayoutTests/http/tests/fetch/keepalive-fetch-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/fetch/keepalive-fetch-expected.txt 2021-08-06 22:18:49 UTC (rev 280740)
@@ -0,0 +1 @@
+Send a keepalive fetch request in an ephemeral session. This test should not cause a crash.
Added: trunk/LayoutTests/http/tests/fetch/keepalive-fetch.html (0 => 280740)
--- trunk/LayoutTests/http/tests/fetch/keepalive-fetch.html (rev 0)
+++ trunk/LayoutTests/http/tests/fetch/keepalive-fetch.html 2021-08-06 22:18:49 UTC (rev 280740)
@@ -0,0 +1,8 @@
+<!-- webkit-test-runner [ useEphemeralSession=true ] -->
+<!DOCTYPE html>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+fetch("/resources/slow-script.pl", { keepalive : true });
+</script>
+Send a keepalive fetch request in an ephemeral session. This test should not cause a crash.
Modified: trunk/Source/WebKit/ChangeLog (280739 => 280740)
--- trunk/Source/WebKit/ChangeLog 2021-08-06 22:16:34 UTC (rev 280739)
+++ trunk/Source/WebKit/ChangeLog 2021-08-06 22:18:49 UTC (rev 280740)
@@ -1,3 +1,23 @@
+2021-08-06 Fujii Hironori <[email protected]>
+
+ ASSERTION FAILED: !m_networkLoad in NetworkResourceLoader::~NetworkResourceLoader()
+ https://bugs.webkit.org/show_bug.cgi?id=228853
+
+ Reviewed by Alex Christensen.
+
+ ~NetworkResourceLoader() had the assertion ensuring m_networkLoad
+ was empty. But, this could fail in the following scenario. If a
+ 'keepalive' fetch request is not finished and the page is
+ navigated away, its NetworkResourceLoader is transferred to the
+ NetworkSession by NetworkConnectionToWebProcess::transferKeptAliveLoad.
+ And, before the request is finished, if the NetworkSession is
+ destroyed, the kept alive NetworkResourceLoader is destroyed.
+
+ Test: http/tests/fetch/keepalive-fetch.html
+
+ * NetworkProcess/NetworkSession.cpp:
+ (WebKit::NetworkSession::~NetworkSession): Abort m_keptAliveLoads.
+
2021-08-06 Aditya Keerthi <[email protected]>
[macOS] 3 second IPC deadlocks involving WebPageProxy::acceptsFirstMouse
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp (280739 => 280740)
--- trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp 2021-08-06 22:16:34 UTC (rev 280739)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp 2021-08-06 22:18:49 UTC (rev 280740)
@@ -137,6 +137,8 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
destroyResourceLoadStatistics([] { });
#endif
+ for (auto& loader : std::exchange(m_keptAliveLoads, { }))
+ loader->abort();
}
#if ENABLE(RESOURCE_LOAD_STATISTICS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes