Bug 1553705 - Make GenerateStateKey() infallible. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D32258
This commit is contained in:
Cameron McCormack
2019-06-26 21:44:03 +00:00
parent f4cf8185db
commit a7dd303c43
12 changed files with 43 additions and 60 deletions

View File

@@ -1566,16 +1566,14 @@ nsComboboxControlFrame::RestoreState(PresState* aState) {
// Append a suffix so that the state key for the combobox is different
// from the state key the list control uses to sometimes save the scroll
// position for the same Element
NS_IMETHODIMP
nsComboboxControlFrame::GenerateStateKey(nsIContent* aContent,
Document* aDocument,
nsACString& aKey) {
nsresult rv = nsContentUtils::GenerateStateKey(aContent, aDocument, aKey);
if (NS_FAILED(rv) || aKey.IsEmpty()) {
return rv;
void nsComboboxControlFrame::GenerateStateKey(nsIContent* aContent,
Document* aDocument,
nsACString& aKey) {
nsContentUtils::GenerateStateKey(aContent, aDocument, aKey);
if (aKey.IsEmpty()) {
return;
}
aKey.AppendLiteral("CCF");
return NS_OK;
}
// Fennec uses a custom combobox built-in widget.