[epiphany/wip/fixes: 6/15] session: Fix EPHY_PREFS_RESTORE_SESSION_POLICY_CRASHED
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/fixes: 6/15] session: Fix EPHY_PREFS_RESTORE_SESSION_POLICY_CRASHED
- Date: Sun, 6 Mar 2016 20:14:15 +0000 (UTC)
commit 194b946aa53679cb3713a8e9f4ab7445097c13ea
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sat Mar 5 14:26:55 2016 -0600
session: Fix EPHY_PREFS_RESTORE_SESSION_POLICY_CRASHED
We accidentally broke this when adding support for
WebKitWebViewSessionState. Currently
EPHY_PREFS_RESTORE_SESSION_POLICY_CRASHED is treated exactly the same as
EPHY_PREFS_RESTORE_SESSION_POLICY_ALWAYS. The simplest way to fix this
is to consider that, if we've made it to ephy_session_close(), then we
have not crashed, that's a good place to delete the session file.
Otherwise, that session file had better be saved so it can be loaded if
we crash, ephy_session_close() is the best place to handle this.
https://bugzilla.gnome.org/show_bug.cgi?id=762906
src/ephy-session.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index afdc2e0..5eaa41d 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -546,8 +546,22 @@ ephy_session_close (EphySession *session)
g_source_remove (session->save_source_id);
session->save_source_id = 0;
}
+
session->closing = TRUE;
- ephy_session_save_idle_cb (session);
+
+ switch (g_settings_get_enum (EPHY_SETTINGS_MAIN, EPHY_PREFS_RESTORE_SESSION_POLICY))
+ {
+ case EPHY_PREFS_RESTORE_SESSION_POLICY_ALWAYS:
+ ephy_session_save_idle_cb (session);
+ break;
+ case EPHY_PREFS_RESTORE_SESSION_POLICY_CRASHED:
+ session_delete (session);
+ break;
+ case EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER:
+ default:
+ break;
+ }
+
session->dont_save = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]