mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 426991 - Form submission extremely slow on large forms (with form Form history turned on). r=sdwilsh, r=gavin
This commit is contained in:
parent
63c721e654
commit
9b815f280a
@ -227,8 +227,6 @@ nsFormHistory::AddEntry(const nsAString &aName, const nsAString &aValue)
|
||||
if (!FormHistoryEnabled())
|
||||
return NS_OK;
|
||||
|
||||
mozStorageTransaction transaction(mDBConn, PR_FALSE);
|
||||
|
||||
PRBool exists = PR_TRUE;
|
||||
EntryExists(aName, aValue, &exists);
|
||||
if (!exists) {
|
||||
@ -242,7 +240,7 @@ nsFormHistory::AddEntry(const nsAString &aName, const nsAString &aValue)
|
||||
rv = mDBInsertNameValue->Execute();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
return transaction.Commit();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -366,6 +364,10 @@ nsFormHistory::Notify(nsIDOMHTMLFormElement* formElt, nsIDOMWindowInternal* aWin
|
||||
|
||||
PRUint32 length;
|
||||
elts->GetLength(&length);
|
||||
if (length == 0)
|
||||
return NS_OK;
|
||||
|
||||
mozStorageTransaction transaction(mDBConn, PR_FALSE);
|
||||
for (PRUint32 i = 0; i < length; ++i) {
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
elts->Item(i, getter_AddRefs(node));
|
||||
@ -398,7 +400,7 @@ nsFormHistory::Notify(nsIDOMHTMLFormElement* formElt, nsIDOMWindowInternal* aWin
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
return transaction.Commit();
|
||||
}
|
||||
nsresult
|
||||
nsFormHistory::OpenDatabase()
|
||||
|
Loading…
Reference in New Issue
Block a user