Bug 1305204 - (Part 1) Backout bug 1275746 a=backout draft
authorValentin Gosu <valentin.gosu@gmail.com>
Mon, 24 Oct 2016 23:01:05 +0200
changeset 428981 4301f341f67ab6db9b05cbaeb9698aaebad206d2
parent 428980 0b0bf76318dc9c5eaf2b8f86bb4132a1d01f7d93
child 428982 160f1c56c493752d5b822d8369603d75f4846185
push id33448
push uservalentin.gosu@gmail.com
push dateMon, 24 Oct 2016 21:36:18 +0000
reviewersbackout
bugs1305204, 1275746
milestone50.0
Bug 1305204 - (Part 1) Backout bug 1275746 a=backout MozReview-Commit-ID: FtOalze9SdY
toolkit/components/places/nsNavHistory.cpp
--- 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);