mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 558654 - Firefox crashes every ~2min after update to 1.2 [r=mconnor]
Limit the number of initial form entries to 500 ordered by "frecency".
This commit is contained in:
parent
4bc0d28e5b
commit
5771a28188
@ -50,8 +50,13 @@ Cu.import("resource://weave/type_records/forms.js");
|
||||
let FormWrapper = {
|
||||
getAllEntries: function getAllEntries() {
|
||||
let entries = [];
|
||||
// Sort by (lastUsed - minLast) / (maxLast - minLast) * timesUsed / maxTimes
|
||||
let query = this.createStatement(
|
||||
"SELECT fieldname, value FROM moz_formhistory");
|
||||
"SELECT fieldname, value FROM moz_formhistory " +
|
||||
"ORDER BY 1.0 * (lastUsed - (SELECT lastUsed FROM moz_formhistory ORDER BY lastUsed ASC LIMIT 1)) / " +
|
||||
"((SELECT lastUsed FROM moz_formhistory ORDER BY lastUsed DESC LIMIT 1) - (SELECT lastUsed FROM moz_formhistory ORDER BY lastUsed ASC LIMIT 1)) * " +
|
||||
"timesUsed / (SELECT timesUsed FROM moz_formhistory ORDER BY timesUsed DESC LIMIT 1) DESC " +
|
||||
"LIMIT 500");
|
||||
while (query.executeStep()) {
|
||||
entries.push({
|
||||
name: query.row.fieldname,
|
||||
|
Loading…
Reference in New Issue
Block a user