Bug 1673682 - Remove unused nsresult return value from URLParams::Sort. r=valentin,necko-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D96419
This commit is contained in:
Simon Giesecke 2020-11-09 18:06:10 +00:00
parent 61560b5e60
commit 0138da753c
3 changed files with 4 additions and 8 deletions

View file

@ -134,10 +134,8 @@ const nsAString& URLSearchParams::GetValueAtIndex(uint32_t aIndex) const {
}
void URLSearchParams::Sort(ErrorResult& aRv) {
aRv = mParams->Sort();
if (!aRv.Failed()) {
NotifyObserver();
}
mParams->Sort();
NotifyObserver();
}
bool URLSearchParams::WriteStructuredClone(

View file

@ -1177,12 +1177,10 @@ void URLParams::Serialize(nsAString& aValue) const {
}
}
nsresult URLParams::Sort() {
void URLParams::Sort() {
mParams.StableSort([](const Param& lhs, const Param& rhs) {
return Compare(lhs.mKey, rhs.mKey);
});
return NS_OK;
}
} // namespace mozilla

View file

@ -270,7 +270,7 @@ class URLParams final {
return mParams[aIndex].mValue;
}
nsresult Sort();
void Sort();
private:
static void DecodeString(const nsACString& aInput, nsAString& aOutput);