Closed
Bug 254298
Opened 20 years ago
Closed 13 years ago
nsPlainTextSerializer.cpp should not use AssignWithConversion
Categories
(Core :: DOM: Serializers, defect)
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: Biesinger, Assigned: m_kato)
References
()
Details
Attachments
(1 file)
1.65 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
content/base/src/nsPlainTextSerializer.cpp should not use AssignWithConversion once bug 252950 is fixed, m1b will be ascii, and this file can use AssignASCII.
Updated•15 years ago
|
Assignee: dom-to-text → nobody
QA Contact: dom-to-text
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: nobody → m_kato
Attachment #570634 -
Flags: review?(Olli.Pettay)
Comment 2•13 years ago
|
||
Comment on attachment 570634 [details] [diff] [review] fix > else { >- textstr.AssignWithConversion(frag->Get1b()+aStartOffset, length); >+ // AssignASCII is for 7-bit character only, so don't use it >+ const char *data = frag->Get1b(); >+ CopyASCIItoUTF16(Substring(data + aStartOffset, data + endoffset), textstr); > } Interesting. Would it be possible to get a test which would fail if AssignASCII was used?
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #2) > Comment on attachment 570634 [details] [diff] [review] [diff] [details] [review] > fix > > > > else { > >- textstr.AssignWithConversion(frag->Get1b()+aStartOffset, length); > >+ // AssignASCII is for 7-bit character only, so don't use it > >+ const char *data = frag->Get1b(); > >+ CopyASCIItoUTF16(Substring(data + aStartOffset, data + endoffset), textstr); > > } > > Interesting. Would it be possible to get a test which would fail if > AssignASCII was used? Several tests are failure if using AssignASCII. https://tbpl.mozilla.org/php/getParsedLog.php?id=7117846&tree=Try https://tbpl.mozilla.org/php/getParsedLog.php?id=7117826&tree=Try https://tbpl.mozilla.org/php/getParsedLog.php?id=7117897&tree=Try Although AssignASCII uses char_traits::copyASCII(), it works on 7-bit character only. If using 8-bit character, it will be different result due to cast. http://mxr.mozilla.org/mozilla-central/source/xpcom/string/public/nsCharTraits.h#222
Comment 4•13 years ago
|
||
Comment on attachment 570634 [details] [diff] [review] fix Ok, thanks.
Attachment #570634 -
Flags: review?(Olli.Pettay) → review+
Assignee | ||
Comment 5•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/89649127982e
Whiteboard: [inbound]
Comment 6•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/89649127982e
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla10
You need to log in
before you can comment on or make changes to this bug.
Description
•