[epiphany/mcatanzaro/ephy-session: 5/6] session: return earlier if no page has been loaded
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/ephy-session: 5/6] session: return earlier if no page has been loaded
- Date: Wed, 24 Feb 2021 18:11:30 +0000 (UTC)
commit a37357bea65baa54872017c7101ecaae84ed3d48
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Feb 24 11:32:07 2021 -0600
session: return earlier if no page has been loaded
There is no need to bother creating the SaveData object in this case.
src/ephy-session.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index eeaa0760c..cabe51a2f 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -997,6 +997,9 @@ ephy_session_save_timeout_cb (EphySession *session)
session->save_source_id = 0;
+ if (!session->loaded_page)
+ return G_SOURCE_REMOVE;
+
/* If we have never successfully loaded any page, or any web view has an
* insane URL, then something has probably gone wrong inside WebKit. For
* instance, if the web process is nonfunctional, the UI process could have
@@ -1005,7 +1008,7 @@ ephy_session_save_timeout_cb (EphySession *session)
* file with our new bogus state. Bug #768250.
*/
data = save_data_new (session);
- if (!session->loaded_page || !session_seems_reasonable (data->windows)) {
+ if (!session_seems_reasonable (data->windows)) {
save_data_free (data);
return G_SOURCE_REMOVE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]