Bug 1305204 - (Part 1) Backout
bug 1275746 a=backout
MozReview-Commit-ID: FtOalze9SdY
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -944,20 +944,16 @@ nsNavHistory::EvaluateQueryForNode(const
// We might have interesting encodings and different case in the host name.
// This will convert that host name into an ASCII host name by sending it
// through the URI canonicalization. The result can be used for comparison
// with other ASCII host name strings.
nsresult // static
nsNavHistory::AsciiHostNameFromHostString(const nsACString& aHostName,
nsACString& aAscii)
{
- aAscii.Truncate();
- if (aHostName.IsEmpty()) {
- return NS_OK;
- }
// To properly generate a uri we must provide a protocol.
nsAutoCString fakeURL("http://");
fakeURL.Append(aHostName);
nsCOMPtr<nsIURI> uri;
nsresult rv = NS_NewURI(getter_AddRefs(uri), fakeURL);
NS_ENSURE_SUCCESS(rv, rv);
rv = uri->GetAsciiHost(aAscii);
NS_ENSURE_SUCCESS(rv, rv);