Bug 416005 - Sort feed readers by pref number, rather than mistakenly count on them coming out of the prefs system in order, r=mano, a=schrep+blocker

This commit is contained in:
philringnalda@gmail.com 2008-02-08 20:46:44 -08:00
parent d81ee21276
commit 2988831fbb

View File

@ -834,6 +834,9 @@ WebContentConverterRegistrar.prototype = {
nums.push(match[1]);
}
// sort them, to get them back in order
nums.sort(function(a, b) {return a - b;});
// now register them
for (var i = 0; i < nums.length; i++) {
var branch = ps.getBranch(PREF_CONTENTHANDLERS_BRANCH + nums[i] + ".");