зеркало из https://github.com/mozilla/gecko-dev.git
Bug 717004: Drop unused/unnecessary rv from GetLayoutHistoryAndKey, and check rv of nsILayoutHistoryState::GetState before using its output. r=volkmar
This commit is contained in:
Родитель
9d53b56f95
Коммит
906e5580a5
|
@ -1624,16 +1624,16 @@ nsGenericHTMLElement::RestoreFormControlState(nsGenericHTMLElement* aContent,
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsILayoutHistoryState> history;
|
nsCOMPtr<nsILayoutHistoryState> history;
|
||||||
nsCAutoString key;
|
nsCAutoString key;
|
||||||
nsresult rv = GetLayoutHistoryAndKey(aContent, true,
|
GetLayoutHistoryAndKey(aContent, true,
|
||||||
getter_AddRefs(history), key);
|
getter_AddRefs(history), key);
|
||||||
if (!history) {
|
if (!history) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsPresState *state;
|
nsPresState *state;
|
||||||
// Get the pres state for this key
|
// Get the pres state for this key
|
||||||
rv = history->GetState(key, &state);
|
nsresult rv = history->GetState(key, &state);
|
||||||
if (state) {
|
if (NS_SUCCEEDED(rv) && state) {
|
||||||
bool result = aControl->RestoreState(state);
|
bool result = aControl->RestoreState(state);
|
||||||
history->RemoveState(key);
|
history->RemoveState(key);
|
||||||
return result;
|
return result;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче