diff --git a/toolkit/components/satchel/src/nsStorageFormHistory.cpp b/toolkit/components/satchel/src/nsStorageFormHistory.cpp index 0f22c92b066..26ac9e52533 100644 --- a/toolkit/components/satchel/src/nsStorageFormHistory.cpp +++ b/toolkit/components/satchel/src/nsStorageFormHistory.cpp @@ -448,7 +448,7 @@ nsFormHistory::OpenDatabase() getter_AddRefs(mDBFindEntryByName)); NS_ENSURE_SUCCESS(rv,rv); - rv = mDBConn->CreateStatement(NS_LITERAL_CSTRING("SELECT value FROM moz_formhistory WHERE fieldname=?1"), + rv = mDBConn->CreateStatement(NS_LITERAL_CSTRING("SELECT value FROM moz_formhistory WHERE fieldname=?1 ORDER BY value ASC"), getter_AddRefs(mDBGetMatchingField)); NS_ENSURE_SUCCESS(rv,rv);