Closed
Bug 1485319
Opened 7 years ago
Closed 5 years ago
Write the FILE_AS_BINARY case of FileReader::DoReadData in terms of SetCapacity and AppendASCIItoUTF16
Categories
(Core :: DOM: File, enhancement, P3)
Core
DOM: File
Tracking
()
RESOLVED
FIXED
mozilla75
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: hsivonen, Assigned: ssengupta)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
FileReader::DoReadData calls nsTSubstring::GetMutableData, which is a rarely used redundant API that would be nice to remove as a clean-up (bug 1485026).
Also, the code does low-level writes via a pointer to mResult's buffer. This code could be written more cleanly with SetCapacity() and AppendASCIItoUTF16(). (Although the latter says "ASCII", it actually performs the Latin1 to UTF-16 conversion, i.e. zero-extends each byte to a char16_t.)
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Assignee: nobody → ssengupta
Status: NEW → ASSIGNED
Assignee | ||
Updated•5 years ago
|
Flags: needinfo?(ssengupta)
Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/66b62186b533
P1 - Call to nsTSubstring::GetMutableData removed r=baku
Comment 4•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox75:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in
before you can comment on or make changes to this bug.
Description
•