Title: [149251] trunk/Source/WebKit2
- Revision
- 149251
- Author
- [email protected]
- Date
- 2013-04-27 20:22:55 -0700 (Sat, 27 Apr 2013)
Log Message
<rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
https://bugs.webkit.org/show_bug.cgi?id=115319
Reviewed by Darin Adler.
WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
alrady canceled on WebProcess side.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (149250 => 149251)
--- trunk/Source/WebKit2/ChangeLog 2013-04-28 01:17:01 UTC (rev 149250)
+++ trunk/Source/WebKit2/ChangeLog 2013-04-28 03:22:55 UTC (rev 149251)
@@ -1,5 +1,23 @@
2013-04-27 Alexey Proskuryakov <[email protected]>
+ <rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
+ https://bugs.webkit.org/show_bug.cgi?id=115319
+
+ Reviewed by Darin Adler.
+
+ WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
+ to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
+ alrady canceled on WebProcess side.
+
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
+ * WebProcess/Network/WebResourceLoader.cpp:
+ (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
+ * WebProcess/Network/WebResourceLoader.h:
+ * WebProcess/Network/WebResourceLoader.messages.in:
+
+2013-04-27 Alexey Proskuryakov <[email protected]>
+
Regression tests that reference a non-local resource crash with NetworkProcess enabled
https://bugs.webkit.org/show_bug.cgi?id=115290
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (149250 => 149251)
--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2013-04-28 01:17:01 UTC (rev 149250)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2013-04-28 03:22:55 UTC (rev 149251)
@@ -152,7 +152,7 @@
if (FormData* formData = request().httpBody())
formData->removeGeneratedFilesIfNeeded();
- sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponseWithCertificateInfo(response, PlatformCertificateInfo(response)));
+ sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponseWithCertificateInfo(response, PlatformCertificateInfo(response), isLoadingMainResource()));
if (!isLoadingMainResource()) {
// For main resources, the web process is responsible for sending back a NetworkResourceLoader::ContinueDidReceiveResponse message.
Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (149250 => 149251)
--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp 2013-04-28 01:17:01 UTC (rev 149250)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp 2013-04-28 03:22:55 UTC (rev 149251)
@@ -99,7 +99,7 @@
m_coreLoader->didSendData(bytesSent, totalBytesToBeSent);
}
-void WebResourceLoader::didReceiveResponseWithCertificateInfo(const ResourceResponse& response, const PlatformCertificateInfo& certificateInfo)
+void WebResourceLoader::didReceiveResponseWithCertificateInfo(const ResourceResponse& response, const PlatformCertificateInfo& certificateInfo, bool needsContinueDidReceiveResponseMessage)
{
LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResponseWithCertificateInfo for '%s'. Status %d.", m_coreLoader->url().string().utf8().data(), response.httpStatusCode());
@@ -109,10 +109,7 @@
responseCopy.setCertificateChain(certificateInfo.certificateChain());
m_coreLoader->didReceiveResponse(responseCopy);
- if (!m_coreLoader)
- return;
-
- if (m_coreLoader == m_coreLoader->documentLoader()->mainResourceLoader())
+ if (needsContinueDidReceiveResponseMessage)
send(Messages::NetworkResourceLoader::ContinueDidReceiveResponse());
}
Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h (149250 => 149251)
--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h 2013-04-28 01:17:01 UTC (rev 149250)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h 2013-04-28 03:22:55 UTC (rev 149251)
@@ -76,7 +76,7 @@
void willSendRequest(const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
void didSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent);
- void didReceiveResponseWithCertificateInfo(const WebCore::ResourceResponse&, const PlatformCertificateInfo&);
+ void didReceiveResponseWithCertificateInfo(const WebCore::ResourceResponse&, const PlatformCertificateInfo&, bool needsContinueDidReceiveResponseMessage);
void didReceiveData(const CoreIPC::DataReference&, int64_t encodedDataLength);
void didFinishResourceLoad(double finishTime);
void didFailResourceLoad(const WebCore::ResourceError&);
Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in (149250 => 149251)
--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in 2013-04-28 01:17:01 UTC (rev 149250)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in 2013-04-28 03:22:55 UTC (rev 149251)
@@ -27,7 +27,7 @@
// FIXME (NetworkProcess): We'll need much more granularity for response messages.
WillSendRequest(WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse)
DidSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent)
- DidReceiveResponseWithCertificateInfo(WebCore::ResourceResponse response, WebKit::PlatformCertificateInfo certificateInfo)
+ DidReceiveResponseWithCertificateInfo(WebCore::ResourceResponse response, WebKit::PlatformCertificateInfo certificateInfo, bool needsContinueDidReceiveResponseMessage)
DidReceiveData(CoreIPC::DataReference data, int64_t encodedDataLength)
DidFinishResourceLoad(double finishTime)
DidFailResourceLoad(WebCore::ResourceError error)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes