From ba54bad81b7e5fabde4ade81da5a4e1a7e567de4 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 22 Aug 2005 13:56:59 +0000 Subject: Remove check for redirected URL. Fixes bug #313756. 2005-08-22 Christian Persch * embed/mozilla/GlobalHistory.cpp: Remove check for redirected URL. Fixes bug #313756. --- embed/mozilla/GlobalHistory.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'embed') diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp index ba6001b9a..6243fb0d2 100644 --- a/embed/mozilla/GlobalHistory.cpp +++ b/embed/mozilla/GlobalHistory.cpp @@ -58,11 +58,6 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT NS_ENSURE_ARG (aURI); - if (aRedirect || !aToplevel) - { - return NS_OK; - } - // filter out unwanted URIs such as chrome: etc // The model is really if we don't know differently then add which basically // means we are suppose to try all the things we know not to allow in and @@ -70,9 +65,7 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT // against the most common case we know to allow in and go on and say yes // to it. - PRBool isHTTP = PR_FALSE; - PRBool isHTTPS = PR_FALSE; - + PRBool isHTTP = PR_FALSE, isHTTPS = PR_FALSE; rv = aURI->SchemeIs("http", &isHTTP); rv |= aURI->SchemeIs("https", &isHTTPS); NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); @@ -96,7 +89,7 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT nsEmbedCString spec; rv = aURI->GetSpec(spec); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_TRUE (NS_SUCCEEDED(rv) && spec.Length(), rv); ephy_history_add_page (mGlobalHistory, spec.get()); -- cgit v1.2.3