Make ReplaceChar take a UTF-16 array

RESOLVED FIXED in mozilla30

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: smontagu, Assigned: smontagu)

Tracking

Trunk
mozilla30
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

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)
Posted 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+
https://hg.mozilla.org/mozilla-central/rev/dc13389afbe5
https://hg.mozilla.org/mozilla-central/rev/d3005bbf540f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.