diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2015-07-31 09:55:19 +0200 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2015-08-03 10:58:43 +0200 |
commit | 74e1ff0dd50afc3450eb494dc3c6f5ac0c00b2f5 (patch) | |
tree | 4ffbba700d8d84fca292a3d54e2323849715de9b | |
parent | f8b2b4e0e050fe8ff04a6ea1d6260a6527822033 (diff) | |
download | epiphany-74e1ff0dd50afc3450eb494dc3c6f5ac0c00b2f5.tar.gz |
Add a setting to set the maximum number of web processes
It allows to limit the amount of web processes created at the same time
by the one-secondary-process-per-web-view process model.
https://bugzilla.gnome.org/show_bug.cgi?id=753092
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | data/org.gnome.epiphany.gschema.xml | 6 | ||||
-rw-r--r-- | embed/ephy-embed-shell.c | 2 | ||||
-rw-r--r-- | lib/ephy-prefs.h | 1 |
4 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 6597911a0..0e73b5134 100644 --- a/configure.ac +++ b/configure.ac @@ -77,7 +77,7 @@ GLIB_REQUIRED=2.38.0 GTK_REQUIRED=3.13.0 LIBXML_REQUIRED=2.6.12 LIBXSLT_REQUIRED=1.1.7 -WEBKIT_GTK_REQUIRED=2.9.4 +WEBKIT_GTK_REQUIRED=2.9.5 LIBSOUP_REQUIRED=2.48.0 GNOME_DESKTOP_REQUIRED=2.91.2 LIBSECRET_REQUIRED=0.14 diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml index d69c37c26..7a1f1039d 100644 --- a/data/org.gnome.epiphany.gschema.xml +++ b/data/org.gnome.epiphany.gschema.xml @@ -71,6 +71,12 @@ <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> </schema> <schema path="/org/gnome/epiphany/ui/" id="org.gnome.Epiphany.ui"> <key type="b" name="always-show-tabs-bar"> diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index 54cae1986..1a9b9a9a1 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -564,6 +564,8 @@ ephy_embed_shell_setup_process_model (EphyEmbedShell *shell) 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)); break; } } diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h index 8f0ba5a46..10adbc550 100644 --- a/lib/ephy-prefs.h +++ b/lib/ephy-prefs.h @@ -106,6 +106,7 @@ typedef enum #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_LOCKDOWN_SCHEMA "org.gnome.Epiphany.lockdown" #define EPHY_PREFS_LOCKDOWN_FULLSCREEN "disable-fullscreen" |