46 bytes, text/x-phabricator-request
|Details | Review|
LossyUTF8ToUTF16() in nsNSSCertHelper.cpp uses XPCOM string conversions in an awkward way. Instead of ToNewUnicode() + Adopt(), it should use strings in a regular non-Adopt() way.
This does not change the outward behavior of LossyUTF8ToUTF16(). Both ToNewUnicode() and CopyASCIItoUTF16() convert from Latin1 to UTF-16. MozReview-Commit-ID: 8SDgvoGaN4A
Aside: The original motivation in bug 1461037 was to avoid assertions when UTF-8 is bogus. Nowadays UTF-8 to UTF-16 conversion replaces errors with the REPLACEMENT CHARACTER instead of asserting.
Comment on attachment 9005109 [details] Bug 1487310 - Let XPCOM strings manage their own buffer in LossyUTF8ToUTF16(). Dana Keeler [:keeler] (she/her) (use needinfo) has approved the revision.
Attachment #9005109 - Flags: review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/c45b51ec248e Let XPCOM strings manage their own buffer in LossyUTF8ToUTF16(). r=keeler
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
status-firefox63: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.