[epiphany/gnome-3-18] ephy-session: Save the pending API request URL if EphyWebView address is about:blank
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-18] ephy-session: Save the pending API request URL if EphyWebView address is about:blank
- Date: Fri, 26 Feb 2016 00:28:06 +0000 (UTC)
commit 7d60c90f3b5f1587e2db86fbea037081c47e0516
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon Feb 22 11:44:42 2016 +0100
ephy-session: Save the pending API request URL if EphyWebView address is about:blank
EphyWebView address is NULL (returned as about:blank) between the
load_url() and the WEBKIT_LOAD_STARTED event, but WebKitWebView knows
the pending API request URL. So use that to prevent losing the URL if
the browser is closed before the WEBKIT_LOAD_STARTED event. This usually
happens when the UI process crashes early, right after the session is
loaded but before restored pages have started loading.
https://bugzilla.gnome.org/show_bug.cgi?id=747860
src/ephy-session.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 7be9c39..ab0b9d9 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -573,6 +573,13 @@ session_tab_new (EphyEmbed *embed)
{
session_tab->url = g_strconcat ("about", address + EPHY_ABOUT_SCHEME_LEN, NULL);
}
+ else if (g_str_equal (address, "about:blank"))
+ {
+ /* EphyWebView address is NULL between load_uri() and WEBKIT_LOAD_STARTED,
+ * but WebKitWebView knows the pending API request URL, so use that instead of about:blank.
+ */
+ session_tab->url = g_strdup (webkit_web_view_get_uri (WEBKIT_WEB_VIEW (web_view)));
+ }
else
{
session_tab->url = g_strdup (address);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]