[epiphany] make g_setenv() calls early enough during startup
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] make g_setenv() calls early enough during startup
- Date: Mon, 2 Jan 2012 13:35:42 +0000 (UTC)
commit 7b548bc81703ac315cfd7ccbc335f65adfe0ba89
Author: Claudio Saavedra <csaavedra igalia com>
Date: Tue Sep 27 23:15:16 2011 +0200
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
src/ephy-main.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 196dc4c..fa85f0a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]