Title: [161559] trunk/Source/WebKit2
Revision
161559
Author
[email protected]
Date
2014-01-09 09:55:39 -0800 (Thu, 09 Jan 2014)

Log Message

Crash when starting a download before the network process has been launched
https://bugs.webkit.org/show_bug.cgi?id=126258

Reviewed by Anders Carlsson.

We need to ensure there's a network process running before
starting a new download like we do when using the web process.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::download): Use ChildProcessProxy::send()
instead of using the connection to make sure messages are queued
if the process is still launching.
(WebKit::WebContext::createDownloadProxy): Call
ensureNetworkProcess() before creating the download proxy.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (161558 => 161559)


--- trunk/Source/WebKit2/ChangeLog	2014-01-09 17:23:48 UTC (rev 161558)
+++ trunk/Source/WebKit2/ChangeLog	2014-01-09 17:55:39 UTC (rev 161559)
@@ -1,5 +1,22 @@
 2014-01-09  Carlos Garcia Campos  <[email protected]>
 
+        Crash when starting a download before the network process has been launched
+        https://bugs.webkit.org/show_bug.cgi?id=126258
+
+        Reviewed by Anders Carlsson.
+
+        We need to ensure there's a network process running before
+        starting a new download like we do when using the web process.
+
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::download): Use ChildProcessProxy::send()
+        instead of using the connection to make sure messages are queued
+        if the process is still launching.
+        (WebKit::WebContext::createDownloadProxy): Call
+        ensureNetworkProcess() before creating the download proxy.
+
+2014-01-09  Carlos Garcia Campos  <[email protected]>
+
         [SOUP] Partial file left on disk after a download fails or is cancelled in WebKit2
         https://bugs.webkit.org/show_bug.cgi?id=126686
 

Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (161558 => 161559)


--- trunk/Source/WebKit2/UIProcess/WebContext.cpp	2014-01-09 17:23:48 UTC (rev 161558)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp	2014-01-09 17:55:39 UTC (rev 161559)
@@ -763,7 +763,7 @@
 #if ENABLE(NETWORK_PROCESS)
     if (usesNetworkProcess() && networkProcess()) {
         // FIXME (NetworkProcess): Replicate whatever FrameLoader::setOriginalURLForDownloadRequest does with the request here.
-        networkProcess()->connection()->send(Messages::NetworkProcess::DownloadRequest(downloadProxy->downloadID(), request), 0);
+        networkProcess()->send(Messages::NetworkProcess::DownloadRequest(downloadProxy->downloadID(), request), 0);
         return downloadProxy;
     }
 #endif
@@ -938,8 +938,11 @@
 DownloadProxy* WebContext::createDownloadProxy()
 {
 #if ENABLE(NETWORK_PROCESS)
-    if (usesNetworkProcess())
+    if (usesNetworkProcess()) {
+        ensureNetworkProcess();
+        ASSERT(m_networkProcess);
         return m_networkProcess->createDownloadProxy();
+    }
 #endif
 
     return ensureSharedWebProcess().createDownloadProxy();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to