Allow us to use network process with a single process model
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Dec 2013 17:47:55 +0000 (17:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Dec 2013 17:47:55 +0000 (17:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125507

Patch by Kwang Yul Seo <skyul@company100.net> on 2013-12-10
Reviewed by Brady Eidson.

Currently, WebContext::sendToNetworkingProcess and
WebContext::sendToNetworkingProcessRelaunchingIfNecessary assume that
network process is not used when the given process model is
ProcessModelSharedSecondaryProcess. This is not consistent with
WebContext::networkingProcessConnection which returns the networking
process connection for ProcessModelSharedSecondaryProcess.

* UIProcess/WebContext.h:
(WebKit::WebContext::sendToNetworkingProcess):
(WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebContext.h

index 8ee2889b11f8ab244e32aff5c995ff576d3c0846..a954598107af8603293aeb787630c074a39874e3 100644 (file)
@@ -1,3 +1,21 @@
+2013-12-10  Kwang Yul Seo  <skyul@company100.net>
+
+        Allow us to use network process with a single process model
+        https://bugs.webkit.org/show_bug.cgi?id=125507
+
+        Reviewed by Brady Eidson.
+
+        Currently, WebContext::sendToNetworkingProcess and
+        WebContext::sendToNetworkingProcessRelaunchingIfNecessary assume that
+        network process is not used when the given process model is
+        ProcessModelSharedSecondaryProcess. This is not consistent with
+        WebContext::networkingProcessConnection which returns the networking
+        process connection for ProcessModelSharedSecondaryProcess.
+
+        * UIProcess/WebContext.h:
+        (WebKit::WebContext::sendToNetworkingProcess):
+        (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary):
+
 2013-12-10  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
 
         Unreviewed EFL build fix
index af7bc073592493904038e3d559dc346c120541fd..95c4901002b0d07d21a08f4bcae79e0293088173 100644 (file)
@@ -516,6 +516,13 @@ void WebContext::sendToNetworkingProcess(T&& message)
 {
     switch (m_processModel) {
     case ProcessModelSharedSecondaryProcess:
+#if ENABLE(NETWORK_PROCESS)
+        if (m_usesNetworkProcess) {
+            if (m_networkProcess->canSendMessage())
+                m_networkProcess->send(std::forward<T>(message), 0);
+            return;
+        }
+#endif
         if (!m_processes.isEmpty() && m_processes[0]->canSendMessage())
             m_processes[0]->send(std::forward<T>(message), 0);
         return;
@@ -536,6 +543,13 @@ void WebContext::sendToNetworkingProcessRelaunchingIfNecessary(T&& message)
 {
     switch (m_processModel) {
     case ProcessModelSharedSecondaryProcess:
+#if ENABLE(NETWORK_PROCESS)
+        if (m_usesNetworkProcess) {
+            ensureNetworkProcess();
+            m_networkProcess->send(std::forward<T>(message), 0);
+            return;
+        }
+#endif
         ensureSharedWebProcess();
         m_processes[0]->send(std::forward<T>(message), 0);
         return;