Bug 1433958 - Change code that sets nsIURI.host to use nsIURIMutator r=mayhemer

MozReview-Commit-ID: 7T5gCu8WOfa
This commit is contained in:
Valentin Gosu
2018-02-26 20:43:47 +01:00
parent a440c73890
commit 4c423bbfee
12 changed files with 55 additions and 42 deletions

View File

@@ -353,7 +353,9 @@ URLMainThread::SetHostname(const nsAString& aHostname, ErrorResult& aRv)
{
// nsStandardURL returns NS_ERROR_UNEXPECTED for an empty hostname
// The return code is silently ignored
mURI->SetHost(NS_ConvertUTF16toUTF8(aHostname));
mozilla::Unused << NS_MutateURI(mURI)
.SetHost(NS_ConvertUTF16toUTF8(aHostname))
.Finalize(mURI);
}
void