[epiphany] Implement shared-secondary-process model as MULTIPLE_SECONDARY_PROCESSES with a process limit of 1



commit 597d7f9f8661e464e083ce75151690012bfca885
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Fri Jul 31 10:15:49 2015 +0200

    Implement shared-secondary-process model as MULTIPLE_SECONDARY_PROCESSES with a process limit of 1
    
    The main difference is that the networking is done in the
    network process, instead of the web process.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753093

 embed/ephy-embed-shell.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 1a9b9a9..5371744 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -550,6 +550,7 @@ static void
 ephy_embed_shell_setup_process_model (EphyEmbedShell *shell)
 {
   EphyPrefsProcessModel process_model;
+  guint max_processes;
 
   if (ephy_embed_shell_get_mode (shell) == EPHY_EMBED_SHELL_MODE_APPLICATION)
     process_model = EPHY_PREFS_PROCESS_MODEL_SHARED_SECONDARY_PROCESS;
@@ -558,16 +559,15 @@ ephy_embed_shell_setup_process_model (EphyEmbedShell *shell)
 
   switch (process_model) {
   case EPHY_PREFS_PROCESS_MODEL_SHARED_SECONDARY_PROCESS:
-    webkit_web_context_set_process_model (shell->priv->web_context,
-                                          WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS);
+    max_processes = 1;
     break;
   case EPHY_PREFS_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW:
-    webkit_web_context_set_process_model (shell->priv->web_context,
-                                          WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
-    webkit_web_context_set_web_process_count_limit (shell->priv->web_context,
-                                                    g_settings_get_uint (EPHY_SETTINGS_MAIN, 
EPHY_PREFS_MAX_PROCESSES));
+    max_processes = g_settings_get_uint (EPHY_SETTINGS_MAIN, EPHY_PREFS_MAX_PROCESSES);
     break;
   }
+
+  webkit_web_context_set_process_model (shell->priv->web_context, 
WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
+  webkit_web_context_set_web_process_count_limit (shell->priv->web_context, max_processes);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]