Bug 1431204 - Change calls to nsIURI.spec setter to use nsIURIMutator instead r=mayhemer

* changes call to use nsIURIMutator.setSpec()
* Add new NS_MutateURI constructor that takes new Mutator object
* Make nsSimpleNestedURI::Mutate() and nsNestedAboutURI::Mutate() return mutable URIs
* Make the finalizers for nsSimpleNestedURI and nsNestedAboutURI make the returned URIs immutable

MozReview-Commit-ID: 1kcv6zMxnv7
This commit is contained in:
Valentin Gosu
2018-01-19 15:19:42 +01:00
parent 5c304366ab
commit a215981c13
17 changed files with 192 additions and 110 deletions

View File

@@ -196,6 +196,9 @@ nsSimpleNestedURI::Mutate(nsIURIMutator** aMutator)
if (NS_FAILED(rv)) {
return rv;
}
// StartClone calls SetMutable(false) but we need the mutator clone
// to be mutable
mutator->ResetMutable();
mutator.forget(aMutator);
return NS_OK;
}