Closed Bug 919935 Opened 12 years ago Closed 12 years ago

EncodingUtils should have a deCOMtaminated replacement for GetUnicodeDecoderRaw

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: hsivonen, Assigned: hsivonen)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

We could make code cleaner and less confusing if after EncodingUtils::FindEncodingForLabel we called something like already_AddRefed<nsIUnicodeDecoder> EncodingUtils::DecoderForEncoding(const nsACString& aEncoding); instead of dealing with the nsICharsetConverterManager service.
Summary: EncodingUtils should have a deCOMtamineted replacement for GetUnicodeDecoderRaw → EncodingUtils should have a deCOMtaminated replacement for GetUnicodeDecoderRaw
Assignee: nobody → hsivonen
Comment on attachment 8337699 [details] [diff] [review] Add deCOMtaminated factories Review of attachment 8337699 [details] [diff] [review]: ----------------------------------------------------------------- ::: intl/uconv/idl/nsICharsetConverterManager.idl @@ +23,5 @@ > interface nsIUTF8StringEnumerator; > > /** > + * DON'T ADD NEW USES OF THIS INTERFACE TO MOZILLA-CENTRAL. Use > + * mozilla::dom::EncodingUtils instead. @deprecated ::: parser/html/nsHtml5StreamParser.cpp @@ +322,2 @@ > mCharset.Assign(aDecoderCharsetName); > + mUnicodeDecoder = EncodingUtils::DecoderForEncoding(mCharset); aDecoderCharsetName?
Attachment #8337699 - Flags: review?(VYV03354) → review+
(In reply to Masatoshi Kimura [:emk] from comment #3) > Comment on attachment 8337699 [details] [diff] [review] > Add deCOMtaminated factories > > Review of attachment 8337699 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: intl/uconv/idl/nsICharsetConverterManager.idl > @@ +23,5 @@ > > interface nsIUTF8StringEnumerator; > > > > /** > > + * DON'T ADD NEW USES OF THIS INTERFACE TO MOZILLA-CENTRAL. Use > > + * mozilla::dom::EncodingUtils instead. > > @deprecated Added. > ::: parser/html/nsHtml5StreamParser.cpp > @@ +322,2 @@ > > mCharset.Assign(aDecoderCharsetName); > > + mUnicodeDecoder = EncodingUtils::DecoderForEncoding(mCharset); > > aDecoderCharsetName? I think passing mCharset as the argument is more idiomatic. Maybe I should have changed the name of aDecoderCharsetName in a previous bug, though. Thanks. Landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/045001182507 Try run for sheriff reference: https://tbpl.mozilla.org/?tree=Try&rev=4024f26b425b
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
Blocks: 986548
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: