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

Differential Revision: https://phabricator.services.mozilla.com/D32258
This commit is contained in:
Cameron McCormack
2019-07-01 07:20:04 +00:00
parent abf4cc2da4
commit c2b8ac8e2e
12 changed files with 43 additions and 60 deletions

View File

@@ -5891,9 +5891,11 @@ void HTMLInputElement::DoneCreatingElement() {
// Restore state as needed. Note that disabled state applies to all control
// types.
//
bool restoredCheckedState = !mInhibitRestoration &&
NS_SUCCEEDED(GenerateStateKey()) &&
RestoreFormControlState();
bool restoredCheckedState = false;
if (!mInhibitRestoration) {
GenerateStateKey();
restoredCheckedState = RestoreFormControlState();
}
//
// If restore does not occur, we initialize .checked using the CHECKED