Closed
Bug 1424898
Opened 7 years ago
Closed 7 years ago
nsILineBreaker and nsIWordBreaker don't need to be COM services or have virtual methods
Categories
(Core :: Internationalization, enhancement)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
Details
Attachments
(2 files)
37.22 KB,
patch
|
m_kato
:
review+
|
Details | Diff | Splinter Review |
32.69 KB,
patch
|
m_kato
:
review+
|
Details | Diff | Splinter Review |
In theory, I guess there was an intention to support dropping in replacement implementations of the nsILineBreaker and nsIWordBreaker services, but we've never actually done that. And if/when we do extend these (e.g. to support language-dependent breaking, bug 203016), the way to do that will be by passing a locale or other "options" argument, not by implementing a separate service.
Accordingly, we can just make these simple concrete interfaces that client code calls directly, eliminating the virtual methods that we currently use.
(At present, the line- and word-breakers don't actually maintain any state, and don't really need to be objects at all; their instance methods could just as well be static functions. But I propose to maintain their object-ness here, in anticipation of upcoming API changes that will introduce actual state to these classes.)
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8936435 -
Flags: review?(m_kato)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8936436 -
Flags: review?(m_kato)
Assignee | ||
Comment 3•7 years ago
|
||
Assuming we do this, it will also impact a couple of places in comm-central code that use the existing interfaces and will need to be updated. I'll file a separate c-c bug for that.
Assignee | ||
Comment 4•7 years ago
|
||
Updated•7 years ago
|
Attachment #8936435 -
Flags: review?(m_kato) → review+
Updated•7 years ago
|
Attachment #8936436 -
Flags: review?(m_kato) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/80ed22b2c35c
patch 1 - De-virtualize nsILineBreaker and rename to mozilla::intl::LineBreaker. r=m_kato
https://hg.mozilla.org/integration/mozilla-inbound/rev/4c6d8b6d91b1
patch 2 - De-virtualize nsIWordBreaker and rename to mozilla::intl::WordBreaker. r=m_kato
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/80ed22b2c35c
https://hg.mozilla.org/mozilla-central/rev/4c6d8b6d91b1
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•