Closed Bug 979556 Opened 10 years ago Closed 10 years ago

Make ReplaceChar take a UTF-16 array

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: smontagu, Assigned: smontagu)

References

Details

Attachments

(2 files, 1 obsolete file)

See bug 847242 comment 4:

>> +  for (uint32_t i = 0; i < ArrayLength(kSeparators); ++i) {
>> +    aBpd->mBuffer.ReplaceChar(kSeparators[i], kSpace);
>
>This doesn't seem efficient. Let's make ReplaceChar work with a UTF16 array >instead.
Attachment #8385602 - Flags: review?(benjamin)
Attached patch Convert caller (obsolete) — Splinter Review
An existing call site using the same pattern as my patch.
Attachment #8385612 - Flags: review?(benjamin)
Attachment #8385602 - Flags: review?(benjamin) → review+
Comment on attachment 8385612 [details] [diff] [review]
Convert caller

Don't you have to null-terminate unsafeBidiCharacters now?
Attachment #8385612 - Flags: review?(benjamin) → review-
Attachment #8385612 - Attachment is obsolete: true
Attachment #8385661 - Flags: review?(benjamin)
Attachment #8385661 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc13389afbe5
https://hg.mozilla.org/integration/mozilla-inbound/rev/d3005bbf540f

Marking in-testsuite+ because this is effectively covered by uriloader/exthandler/tests/mochitest/test_unsafeBidiChars.xhtml
Flags: in-testsuite+
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: