[epiphany] 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] ephy-session: Save the pending API request URL if EphyWebView address is about:blank
- Date: Wed, 24 Feb 2016 19:16:09 +0000 (UTC)
commit 1d987830127f42ab6a93fe031f84027606e2b324
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 f1b5b89..2b1601e 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -595,6 +595,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]