Closed
Bug 1488659
Opened 6 years ago
Closed 6 years ago
Remove XPCOM registration of nsICharsetDetector
Categories
(Core :: Internationalization, enhancement)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: hsivonen, Assigned: ehsan.akhgari)
References
(Blocks 1 open bug)
Details
(Whiteboard: [overhead:noted])
Attachments
(2 files)
nsICharsetDetector is only used from C++.
Updated•6 years ago
|
Whiteboard: [overhead:noted]
Assignee | ||
Comment 1•6 years ago
|
||
Is this even possible given that this component is used in these categories?
https://searchfox.org/mozilla-central/rev/6201a9e0067cf6af118c6a99ae9314b8ceb2c4d5/intl/chardet/nsChardetModule.cpp#33
https://searchfox.org/mozilla-central/rev/6201a9e0067cf6af118c6a99ae9314b8ceb2c4d5/extensions/universalchardet/src/xpcom/nsUniversalCharDetModule.cpp#41
Flags: needinfo?(hsivonen)
Assignee | ||
Comment 2•6 years ago
|
||
The XPCOM category seems to be unused to me...
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to :Ehsan Akhgari from comment #1)
> Is this even possible given that this component is used in these categories?
It's possible. There are three implementation classes: Japanese, Russian and Ukrainian. There's one instantiation site: https://searchfox.org/mozilla-central/source/parser/html/nsHtml5StreamParser.cpp#209
All that's needed is exposing three constructors or factory methods and making the instantiation site check for three magic strings to decide which one to use.
Flags: needinfo?(hsivonen)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D5392
Comment 6•6 years ago
|
||
Flagging Jorg.K as c-c still has a reference to nsICharsetDetector:
https://dxr.mozilla.org/comm-central/rev/e5e1510b8d914bfa8439b21ba3f73e4f2e83e957/mailnews/base/util/nsMsgUtils.cpp#1941-1955
Please see here how to rewrite the code:
https://phabricator.services.mozilla.com/D5392#C122482NL203
Flags: needinfo?(jorgk)
Reporter | ||
Comment 7•6 years ago
|
||
Comment on attachment 9007652 [details]
Bug 1488659 - Part 1: Remove the XPCOM registrations for character detector classes; r=hsivonen
Henri Sivonen (:hsivonen) has approved the revision.
Attachment #9007652 -
Flags: review+
Reporter | ||
Comment 8•6 years ago
|
||
Comment on attachment 9007653 [details]
Bug 1488659 - Part 2: Remove some dead code and mark the remaining detector classes as final; r=hsivonen
Henri Sivonen (:hsivonen) has approved the revision.
Attachment #9007653 -
Flags: review+
Comment 9•6 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #6)
> Flagging Jorg.K as c-c still has a reference to nsICharsetDetector:
Thanks, I filed bug 1489949 for the C-C work. Awaiting the final version of the code here to copy/paste.
Flags: needinfo?(jorgk)
Comment 10•6 years ago
|
||
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d94ad30a3001
Part 1: Remove the XPCOM registrations for character detector classes; r=hsivonen
https://hg.mozilla.org/integration/mozilla-inbound/rev/68ad5bdca1ce
Part 2: Remove some dead code and mark the remaining detector classes as final; r=hsivonen
Comment 11•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d94ad30a3001
https://hg.mozilla.org/mozilla-central/rev/68ad5bdca1ce
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•