mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Bug 1261123 - don't needlessly construct nsAutoCString temporaries in nsDefaultURIFixup; r=smaug
We can make the non-virtual overload of IsDomainWhitelisted take an nsACString instead of an nsAutoCString and avoid some unnecessary copying.
This commit is contained in:
parent
a44e8e3375
commit
a13a3ea88a
@ -1071,7 +1071,7 @@ nsDefaultURIFixup::KeywordURIFixup(const nsACString& aURIString,
|
||||
}
|
||||
|
||||
bool
|
||||
nsDefaultURIFixup::IsDomainWhitelisted(const nsAutoCString aAsciiHost,
|
||||
nsDefaultURIFixup::IsDomainWhitelisted(const nsACString& aAsciiHost,
|
||||
const uint32_t aDotLoc)
|
||||
{
|
||||
if (sDNSFirstForSingleWords) {
|
||||
@ -1098,7 +1098,7 @@ nsDefaultURIFixup::IsDomainWhitelisted(const nsACString& aDomain,
|
||||
const uint32_t aDotLoc,
|
||||
bool* aResult)
|
||||
{
|
||||
*aResult = IsDomainWhitelisted(nsAutoCString(aDomain), aDotLoc);
|
||||
*aResult = IsDomainWhitelisted(aDomain, aDotLoc);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ private:
|
||||
bool PossiblyHostPortUrl(const nsACString& aUrl);
|
||||
bool MakeAlternateURI(nsIURI* aURI);
|
||||
bool IsLikelyFTP(const nsCString& aHostSpec);
|
||||
bool IsDomainWhitelisted(const nsAutoCString aAsciiHost,
|
||||
bool IsDomainWhitelisted(const nsACString& aAsciiHost,
|
||||
const uint32_t aDotLoc);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user