Closed
Bug 278835
Opened 20 years ago
Closed 20 years ago
nsTextFormatter: cvt_s could use UTF8ToNewUnicode
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.8beta2
People
(Reporter: Biesinger, Assigned: bzbarsky)
References
()
Details
(Keywords: memory-footprint)
Attachments
(1 file)
|
5.94 KB,
patch
|
dougt
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
nsTextFormatter implements an UTF-8 to UTF-16 (or UCS-2, not sure) function
itself. Instead, it could just use UTF8ToNewUnicode, provided by nsReadableUtils.
| Assignee | ||
Comment 1•20 years ago
|
||
This even preserves the use of stack for not-too-big strings.
The one drawback is that this doesn't return -1 on memory allocation
failures... it just outputs an empty string. If that's deemed an issue, I can
switch to using UTF8ToNewUnicode as suggested in the summary.
Attachment #173306 -
Flags: superreview?(darin)
Attachment #173306 -
Flags: review?(dougt)
| Reporter | ||
Comment 2•20 years ago
|
||
I noticed this in the diff output:
** BiuldArgArray stands for Numbered Argument list Sprintf
wanna fix that typo while touching code near it? :)
| Assignee | ||
Comment 3•20 years ago
|
||
Yeah, I could do that.
Comment 4•20 years ago
|
||
Comment on attachment 173306 [details] [diff] [review]
How about this?
This looks great to me. sr=darin
Attachment #173306 -
Flags: superreview?(darin) → superreview+
Comment 5•20 years ago
|
||
Comment on attachment 173306 [details] [diff] [review]
How about this?
r=dougt. Always love to remove code.
Attachment #173306 -
Flags: review?(dougt) → review+
| Assignee | ||
Updated•20 years ago
|
Assignee: dougt → bzbarsky
Target Milestone: --- → mozilla1.8beta2
| Assignee | ||
Comment 6•20 years ago
|
||
Fixed on trunk for 1.8b2.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•