aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2011-09-28 05:15:16 +0800
committerXan Lopez <xan@igalia.com>2012-01-02 21:27:42 +0800
commit7b548bc81703ac315cfd7ccbc335f65adfe0ba89 (patch)
treea1bb8adc8333fcaa46a04acebda6f2f116e94f5e
parent36daaa05e85989d371b9c3d3c4fd3ad49572b728 (diff)
downloadgsoc2013-epiphany-7b548bc81703ac315cfd7ccbc335f65adfe0ba89.tar
gsoc2013-epiphany-7b548bc81703ac315cfd7ccbc335f65adfe0ba89.tar.gz
gsoc2013-epiphany-7b548bc81703ac315cfd7ccbc335f65adfe0ba89.tar.bz2
gsoc2013-epiphany-7b548bc81703ac315cfd7ccbc335f65adfe0ba89.tar.lz
gsoc2013-epiphany-7b548bc81703ac315cfd7ccbc335f65adfe0ba89.tar.xz
gsoc2013-epiphany-7b548bc81703ac315cfd7ccbc335f65adfe0ba89.tar.zst
gsoc2013-epiphany-7b548bc81703ac315cfd7ccbc335f65adfe0ba89.zip
make g_setenv() calls early enough during startup
g_setenv() and getenv() are not thread-safe, so we need to make sure that g_setenv() call in main is done earlier than anything that can trigger a getenv() call. https://bugzilla.gnome.org/show_bug.cgi?id=659145
-rw-r--r--src/ephy-main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 196dc4c3a..fa85f0a5b 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -380,6 +380,18 @@ main (int argc,
exit (1);
}
+ /* Work-around Flash Player crash */
+ g_setenv ("XLIB_SKIP_ARGB_VISUALS", "1", FALSE);
+
+ /* Start our services */
+ if (!ephy_file_helpers_init (profile_directory,
+ private_instance || application_mode,
+ keep_temp_directory || profile_directory,
+ &error)) {
+ show_error_message (&error);
+ exit (1);
+ }
+
arbitrary_url = g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
EPHY_PREFS_LOCKDOWN_ARBITRARY_URL);
@@ -408,15 +420,6 @@ main (int argc,
startup_error_quark = g_quark_from_static_string ("epiphany-startup-error");
- /* Start our services */
- if (!ephy_file_helpers_init (profile_directory,
- private_instance || application_mode,
- keep_temp_directory || profile_directory,
- &error)) {
- show_error_message (&error);
- exit (1);
- }
-
/* Delete the requested web application, if any. Must happen after
* ephy_file_helpers_init (). */
if (application_to_delete) {
@@ -427,9 +430,6 @@ main (int argc,
ephy_stock_icons_init ();
ephy_file_load_accels ();
- /* Work-around Flash Player crash */
- g_setenv ("XLIB_SKIP_ARGB_VISUALS", "1", FALSE);
-
/* Now create the shell */
if (private_instance)
mode = EPHY_EMBED_SHELL_MODE_PRIVATE;