Closed Bug 94831 Opened 19 years ago Closed 19 years ago

convert mozilla/intl/locale/src/nsLocalModule to generic module

Categories

(Core :: Internationalization, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.5

People

(Reporter: waterson, Assigned: waterson)

References

Details

(Keywords: topembed, Whiteboard: fixed-on-trunk)

Attachments

(7 files)

Need to convert this to a generic module to get static build to work right.
Status: NEW → ASSIGNED
Keywords: topembed
Priority: -- → P1
Target Milestone: --- → mozilla0.9.4
Blocks: 93100
I removed nsLocaleFactoryUnix.[h|cpp], and replaced the ad hoc module
implementation in nsLocaleModule.cpp with generic module stuff.

ftang, please review, or find somebody to review -- thanks!
I should note that the above patch was made against MOZILLA_0_9_2_BRANCH. I'll
attach a patch for the trunk shortly.
Keywords: patch
See also bug 93566 for mac
For this to work, we need to apply attachment 45489 [details] [diff] [review] (for Unix), attachment 
45746 [details] [diff] [review] (for Windows), and attachment 45703 [details] [diff] [review] from bug 93556 (for Mac).
...sorry, bug 93566 for Mac.
I feel so embarssed that we stil have this code here. Thanks waterson, I should 
buy you a lunch for doing this for us....

r=ftang
Okay, so the above patch is not sufficient. Whoever wrote the COM glue for the
locale module was very...creative. I'm going to need to rewrite most of it. *sob*
*** Bug 93566 has been marked as a duplicate of this bug. ***
Okay, here's what I did.

- The old locale that tague (?) wrote had hand-coded factories for
  every class. I replaced those with generic factories as best I could.

- Along those lines, got rid of ns[IWin32|Mac|OS2|Posix]LocaleFactory.[h|cpp],
  which are not needed. (Actually, still need to do OS2, ...)

- I removed the nsI[IWin32|Mac|OS2|Posix]Locale.h interfaces (which were
  all identical), and replaced them with nsIPlatformLocale.

- Got rid of ns[I]LocalFactory.[h|cpp], as it was obsolete (assertions in
  the ctor).

- Normalized nsLocale[DLL|Module|SHLIB].cpp to use generic factory stuff

- Got rid of hard-coded CIDs and IIDs where reasonable.

Still need to test on Mac and Win32. Could use some help on OS/2 also.
I'm having trouble applying the diff. I'll look at it though.
What user actions excercise this code?
Well, I get some assertions at startup if it's wrong, but I have _no_ idea what
it does or where it is being used.
Attached patch another attemptSplinter Review
Okay, so it turns out that nsI[Mac|OS2|Posix|Win32]Locale are all subtly
different in mysterious ways. So, I've put those interfaces back the way they were.

The above patch compiles and runs on Unix and Windows, makes it at least through
the intl folder on Mac, and has an honest attempt at getting this right on OS/2.
If there are any other nits that I got wrong on the Mac side, I'll attach them
anon as my build progresses.
I crash-landed this onto the trunk tonight.
assignee_accessible: 1 → 0
CC list accessible: false
qacontact_accessible: 1 → 0
Not accessible to reporter
Whiteboard: fixed-on-trunk
assignee_accessible: 0 → 1
CC list accessible: true
qacontact_accessible: 0 → 1
Accessible to reporter
Fixing database corruption caused by bug 95743.  Pay no attention to the man
behind the curtain.
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Chris,

Does you branch patch have the os/2 bustage fixes you did in it?

http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&su
bdir=mozilla/intl/locale/src/os2&command=DIFF_FRAMESET&file=nsLocaleModule.cpp&r
ev1=1.8&rev2=1.9&root=/cvsroot
mkaply: yes, it should. I hand-merged files from the trunk, and hopefully caught
everything. When (if?) I land these, would you mind if I ping'd you to do a build?
Switching qa contact to teruko for now since it is a topembed bug.  Please
re-assign further as you see is appropriate.
QA Contact: andreasb → teruko
let's get it on 0.9.2 branch. thanks
changing qa contact to yokoyama since it is a coding modification.
QA Contact: teruko → yokoyama
Checked in on the branch.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.