Closed
Bug 1445692
Opened 6 years ago
Closed 6 years ago
Remove UTF8InputStream
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
Details
Attachments
(1 file)
UTF8InputStream is redundant with nsConverterInputStream initialized with UTF-8 and uses facilities that I want to remove as part of bug 1402247.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8958932 -
Flags: review?(nfroyd)
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8958932 [details] Bug 1445692 - Remove UTF8InputStream. https://reviewboard.mozilla.org/r/227796/#review235092 ::: xpcom/io/nsUnicharInputStream.cpp:139 (Diff revision 3) > - RefPtr<UTF8InputStream> it = new UTF8InputStream(); > - nsresult rv = it->Init(aStreamToWrap); > + RefPtr<nsConverterInputStream> it = new nsConverterInputStream(); > + nsresult rv = > + it->Init(aStreamToWrap, > + "UTF-8", > + STRING_BUFFER_SIZE, > + 0); Would it be worth adding a comment here as to the meaning of `0`? Or, alternatively, WDYT about adding: ``` const char16_t THROW_EXCEPTIONS_ON_INVALID_BYTE_SEQUENCES = 0; ``` to `nsIConverterInputStream.idl` (name subject to bikeshedding), so we don't have these weird constants hanging out in `Init` calls?
Attachment #8958932 -
Flags: review?(nfroyd) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8958932 [details] Bug 1445692 - Remove UTF8InputStream. https://reviewboard.mozilla.org/r/227796/#review235092 > Would it be worth adding a comment here as to the meaning of `0`? Or, alternatively, WDYT about adding: > > ``` > const char16_t THROW_EXCEPTIONS_ON_INVALID_BYTE_SEQUENCES = 0; > ``` > > to `nsIConverterInputStream.idl` (name subject to bikeshedding), so we don't have these weird constants hanging out in `Init` calls? Introduced `nsIConverterInputStream::ERRORS_ARE_FATAL`.
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a53f91f3fa73 Remove UTF8InputStream. r=froydnj
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a53f91f3fa73
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•