Remove the unneeded NetworkProcessCrashed message
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Dec 2012 23:35:50 +0000 (23:35 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Dec 2012 23:35:50 +0000 (23:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=105114

Reviewed by Sam Weinig.

Remove the NetworkProcessCrashed message; it's not needed since the connection member variable is already
nulled out in WebProcess::networkProcessConnectionClosed which is called when the Connection::Client::didClose member
function is called on the connection between the web process and network process.

Furthermore, this message was handled on the connection queue which runs on a different thread and the handler was not
thread-safe so this could in theory cause bad crashes.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose):
* WebProcess/WebProcess.cpp:
* WebProcess/WebProcess.h:
(WebProcess):
* WebProcess/WebProcess.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137815 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/WebProcess/WebProcess.messages.in

index a1db768..250cbbb 100644 (file)
@@ -1,5 +1,26 @@
 2012-12-15  Anders Carlsson  <andersca@apple.com>
 
+        Remove the unneeded NetworkProcessCrashed message
+        https://bugs.webkit.org/show_bug.cgi?id=105114
+
+        Reviewed by Sam Weinig.
+
+        Remove the NetworkProcessCrashed message; it's not needed since the connection member variable is already
+        nulled out in WebProcess::networkProcessConnectionClosed which is called when the Connection::Client::didClose member
+        function is called on the connection between the web process and network process.
+        
+        Furthermore, this message was handled on the connection queue which runs on a different thread and the handler was not
+        thread-safe so this could in theory cause bad crashes.
+
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::didClose):
+        * WebProcess/WebProcess.cpp:
+        * WebProcess/WebProcess.h:
+        (WebProcess):
+        * WebProcess/WebProcess.messages.in:
+
+2012-12-15  Anders Carlsson  <andersca@apple.com>
+
         Add a DownloadProxyMap object to the NetworkProcessProxy object
         https://bugs.webkit.org/show_bug.cgi?id=105112
 
index c07e604..2ae04fa 100644 (file)
@@ -111,11 +111,6 @@ void NetworkProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, Cor
 
 void NetworkProcessProxy::didClose(CoreIPC::Connection*)
 {
-    // Notify all WebProcesses that the NetworkProcess crashed.
-    const Vector<WebContext*>& contexts = WebContext::allContexts();
-    for (size_t i = 0; i < contexts.size(); ++i)
-        contexts[i]->sendToAllProcesses(Messages::WebProcess::NetworkProcessCrashed());
-
     if (m_downloadProxyMap)
         m_downloadProxyMap->processDidClose();
 
index a710b9f..294cdf8 100644 (file)
@@ -999,14 +999,6 @@ void WebProcess::networkProcessConnectionClosed(NetworkProcessConnection* connec
     m_networkProcessConnection = 0;
 }
 
-void WebProcess::networkProcessCrashed(CoreIPC::Connection*)
-{
-    // FIXME (NetworkProcess): How do we handle not having the connection when the WebProcess needs it?
-    // If the NetworkProcess crashed, for example.  Do we respawn it?
-    ASSERT(m_networkProcessConnection);
-    
-    networkProcessConnectionClosed(m_networkProcessConnection.get());
-}
 #endif
 
 #if ENABLE(PLUGIN_PROCESS)
index 0adb6a8..454df1c 100644 (file)
@@ -261,9 +261,6 @@ private:
     void clearPluginSiteData(const Vector<String>& pluginPaths, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
 #endif
 
-#if ENABLE(NETWORK_PROCESS)
-    void networkProcessCrashed(CoreIPC::Connection*);
-#endif
 #if ENABLE(PLUGIN_PROCESS)
     void pluginProcessCrashed(CoreIPC::Connection*, const String& pluginPath, uint32_t processType);
 #endif
index 01be395..31dcdd1 100644 (file)
@@ -69,10 +69,6 @@ messages -> WebProcess {
 #endif
     DidAddPlugInAutoStartOrigin(uint32_t hash)
 
-#if ENABLE(NETWORK_PROCESS)
-    NetworkProcessCrashed() DispatchOnConnectionQueue
-#endif
-
 #if ENABLE(PLUGIN_PROCESS)
     PluginProcessCrashed(String pluginProcess, uint32_t processType) DispatchOnConnectionQueue
 #endif