Closed
Bug 1448581
Opened 6 years ago
Closed 6 years ago
Avoid useless SIMD checks in CharacterData::ToCString
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
Details
Attachments
(1 file)
We append as ASCII buffer shorter than 16, so AppendASCIItoUTF16 is an overkill.
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8962078 [details] Bug 1448581 - Use AppendPrintf() in CharacterData::ToCString(). . https://reviewboard.mozilla.org/r/230916/#review236746 Why don't we just ::: dom/base/CharacterData.cpp:430 (Diff revision 1) > } else if (ch == '>') { > aBuf.AppendLiteral(">"); > } else if ((ch < ' ') || (ch >= 127)) { > char buf[10]; > SprintfLiteral(buf, "\\u%04x", ch); > - AppendASCIItoUTF16(buf, aBuf); > + aBuf.AppendASCII(buf); It'd be even cleaner if we just `aBuf.AppendPrintf("\\u%04x", ch);`.
Attachment #8962078 -
Flags: review?(nika) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8962078 [details] Bug 1448581 - Use AppendPrintf() in CharacterData::ToCString(). . https://reviewboard.mozilla.org/r/230916/#review236746 > It'd be even cleaner if we just `aBuf.AppendPrintf("\\u%04x", ch);`. Thanks for pointing out the existence of that method! Fixed.
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/729b8eb8a432 Use AppendPrintf() in CharacterData::ToCString(). r=mystor.
Updated•6 years ago
|
Priority: -- → P2
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/729b8eb8a432
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
•