Closed Bug 608958 Opened 14 years ago Closed 14 years ago

Omnijar doesn't load preference files in reverse alphabetical order

Categories

(Core :: Preferences: Backend, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b8

People

(Reporter: rain1, Assigned: neil)

References

Details

Attachments

(1 file)

The pref file "spec" at <https://developer.mozilla.org/En/A_Brief_Guide_to_Mozilla_Preferences#Preferences_Loading_and_Resolution> mentions that pref files are loaded in reverse alphabetical order. This doesn't seem to be true with omnijar, as we discovered while trying to get a Thunderbird omnijar build running (prefs in mailnews.js override prefs in all-thunderbird.js). Per <http://mxr.mozilla.org/comm-central/source/mozilla/modules/libpref/src/nsPrefService.cpp?mark=871-881#856>, there doesn't seem to be anything that explicitly sorts the files in reverse alphabetical order as there is in <http://mxr.mozilla.org/comm-central/source/mozilla/modules/libpref/src/nsPrefService.cpp?mark=653-661#653>.
It looks like the file names are hashed so that omnijar uses a predictable but meaningless order?
Attached patch Possible patchSplinter Review
Would this work perhaps?
(In reply to comment #2) > Created attachment 488454 [details] [diff] [review] > Possible patch > > Would this work perhaps? Wouldn't that be alphabetical order?
(In reply to comment #3) > (In reply to comment #2) > > Created attachment 488454 [details] [diff] [review] [details] > > Possible patch > > > > Would this work perhaps? > > Wouldn't that be alphabetical order? Oops, ignore that question, I should have read the next line more closely as well...
I've just tried this on Thunderbird's try server and it definitely fixes the MozMill issues that we were seeing before with omnijar.
Assignee: nobody → neil
Attachment #488454 - Flags: review?(dwitte)
Comment on attachment 488454 [details] [diff] [review] Possible patch r=dwitte. I assume we do want case-sensitive sorting here, since nothing says otherwise.
Attachment #488454 - Flags: review?(dwitte) → review+
(In reply to comment #6) > I assume we do want case-sensitive sorting here, since nothing says otherwise. The existing code does case-sensitive sorting too but our preference files all only use lower case anyway.
Comment on attachment 488454 [details] [diff] [review] Possible patch This patch is necessary for comm-central to be able to use omnijar.
Attachment #488454 - Flags: approval2.0?
Attachment #488454 - Flags: approval2.0? → approval2.0+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Version: unspecified → Trunk
I updated <https://developer.mozilla.org/En/A_Brief_Guide_to_Mozilla_Preferences#Preferences_Loading_and_Resolution> to note that the sorting is case-sensitive and to remove the existing note about this bug.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: