move gCategoryImp to its point of use to avoid a static constructor

RESOLVED FIXED in mozilla27

Status

()

Core
Internationalization
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: froydnj, Unassigned)

Tracking

unspecified
mozilla27
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Reporter)

Comment 1

5 years ago
Created attachment 791438 [details] [diff] [review]
move gCategoryImp to its point of use to avoid a static constructor

No reason that we need to initialize this until someone asks for it.
(Reporter)

Updated

5 years ago
Attachment #791438 - Flags: review?(smontagu)

Comment 2

5 years ago
(I'd have considered using the module constructor and destructor rather than function scope statics (which I think aren't great either, though not sure what the compiler generated code for them looks like these days).  But maybe this is an improvement anyway.)
Is this interface even used any more? I think it's now only some vestigial remnants after having its functionality replaced by mozilla::unicode
Flags: needinfo?(jfkthame)
(Reporter)

Comment 4

5 years ago
Ping to smontagu and jfkthame....
Huh, sorry - I thought I'd responded to this, but apparently that was only in my head. :(

AFAIK, this is no longer used anywhere in Gecko or Firefox, as we use the COM-free mozilla::unicode functions directly.

However, it's possible that there is external code (e.g. addons, or maybe front-end code in other apps such as Thunderbird) that relies on it, so I'd be hesitant to remove it completely without further investigation.
Flags: needinfo?(jfkthame)
Comment on attachment 791438 [details] [diff] [review]
move gCategoryImp to its point of use to avoid a static constructor

Review of attachment 791438 [details] [diff] [review]:
-----------------------------------------------------------------

So if we aren't going to remove the interface this is presumably a worthwhile improvement
Attachment #791438 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/d6357352d724
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.