[epiphany/mcatanzaro/settings-cleanup: 1/2] Remove unsafe process model and process count settings



commit 71728c83d9567eec2fca1e4c0d7d7de89bf90a86
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Jan 23 18:57:32 2019 -0600

    Remove unsafe process model and process count settings
    
    See https://bugs.webkit.org/show_bug.cgi?id=193749 for explanation.

 data/org.gnome.epiphany.gschema.xml | 11 -----------
 embed/ephy-embed-shell.c            | 30 ++----------------------------
 lib/ephy-prefs.h                    |  8 --------
 3 files changed, 2 insertions(+), 47 deletions(-)
---
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index 531b7dd3b..ab5a4aa5e 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -85,17 +85,6 @@
                         <summary>Whether to delay loading of tabs that are not immediately visible on 
session restore</summary>
                         <description>When this option is set to true, tabs will not start loading until the 
user switches to them, upon session restore.</description>
                 </key>
-                <key name="process-model" enum="org.gnome.Epiphany.EphyPrefsProcessModel">
-                        <default>'one-secondary-process-per-web-view'</default>
-                        <summary>Process model</summary>
-                        <description>This option allows to set the process model used. Use 
“shared-secondary-process” to use a single web process shared by all the tabs and 
“one-secondary-process-per-web-view” to use a different web process for each tab.</description>
-                </key>
-                <key type="u" name="max-processes">
-                        <default>0</default>
-                        <summary>Maximum number of web processes created at the same time when using 
“one-secondary-process-per-web-view” model</summary>
-                        <description>This option sets a limit to the number of web processes that will be 
used at the same time for the “one-secondary-process-per-web-view” model. The default value is “0” and means 
no limit.</description>
-
-                </key>
                 <key type="as" name="adblock-filters">
                         <default>['https://easylist.to/easylist/easylist.txt', 
'https://easylist.to/easylist/easyprivacy.txt']</default>
                         <summary>List of adblock filters</summary>
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 9d2a00578..8ff579aba 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -1062,33 +1062,6 @@ ephy_embed_shell_setup_web_extensions_server (EphyEmbedShell *shell)
   g_object_unref (observer);
 }
 
-static void
-ephy_embed_shell_setup_process_model (EphyEmbedShell *shell)
-{
-  EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (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;
-  else
-    process_model = g_settings_get_enum (EPHY_SETTINGS_MAIN, EPHY_PREFS_PROCESS_MODEL);
-
-  switch (process_model) {
-    case EPHY_PREFS_PROCESS_MODEL_SHARED_SECONDARY_PROCESS:
-      max_processes = 1;
-      break;
-    case EPHY_PREFS_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW:
-      max_processes = g_settings_get_uint (EPHY_SETTINGS_MAIN, EPHY_PREFS_MAX_PROCESSES);
-      break;
-    default:
-      g_assert_not_reached ();
-  }
-
-  webkit_web_context_set_process_model (priv->web_context, 
WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
-  webkit_web_context_set_web_process_count_limit (priv->web_context, max_processes);
-}
-
 static void
 ephy_embed_shell_create_web_context (EphyEmbedShell *shell)
 {
@@ -1261,7 +1234,8 @@ ephy_embed_shell_startup (GApplication *application)
                     G_CALLBACK (web_extension_password_manager_request_save_received_cb),
                     shell);
 
-  ephy_embed_shell_setup_process_model (shell);
+  webkit_web_context_set_process_model (priv->web_context, 
WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
+
   g_signal_connect_object (priv->web_context, "initialize-web-extensions",
                            G_CALLBACK (initialize_web_extensions),
                            shell, 0);
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index 0d84496e0..e71b35efb 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -64,12 +64,6 @@ typedef enum
   EPHY_PREFS_WEB_COOKIES_POLICY_NEVER
 } EphyPrefsWebCookiesPolicy;
 
-typedef enum
-{
-  EPHY_PREFS_PROCESS_MODEL_SHARED_SECONDARY_PROCESS,
-  EPHY_PREFS_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW
-} EphyPrefsProcessModel;
-
 #define EPHY_PREFS_UI_SCHEMA                     "org.gnome.Epiphany.ui"
 #define EPHY_PREFS_UI_EXPAND_TABS_BAR            "expand-tabs-bar"
 #define EPHY_PREFS_UI_TABS_BAR_POSITION          "tabs-bar-position"
@@ -166,8 +160,6 @@ static const char * const ephy_prefs_web_schema[] = {
 #define EPHY_PREFS_INTERNAL_VIEW_SOURCE               "internal-view-source"
 #define EPHY_PREFS_RESTORE_SESSION_POLICY             "restore-session-policy"
 #define EPHY_PREFS_RESTORE_SESSION_DELAYING_LOADS     "restore-session-delaying-loads"
-#define EPHY_PREFS_PROCESS_MODEL                      "process-model"
-#define EPHY_PREFS_MAX_PROCESSES                      "max-processes"
 #define EPHY_PREFS_ADBLOCK_FILTERS                    "adblock-filters"
 #define EPHY_PREFS_SEARCH_ENGINES                     "search-engines"
 #define EPHY_PREFS_DEFAULT_SEARCH_ENGINE              "default-search-engine"


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