Closed Bug 1025184 Opened 10 years ago Closed 9 years ago

Make ConstTwoByteChars a Range, like TwoByteChars

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: jandem, Unassigned)

Details

Attachments

(1 file)

In bug 1023778 we noticed that ConstTwoByteChars is a RangedPtr and TwoByteChars is a Range. Both should be Ranges.

There are other RangedPtr types in CharacterEncoding.h, like TwoByteCharsZ.
Made definition of ConstTwoByteChars almost same as TwoByteChars, with const.

Green on try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9a47af8c9a45
Attachment #8557921 - Flags: review?(jdemooij)
Comment on attachment 8557921 [details] [diff] [review]
Make ConstTwoByteChars a Range.

Review of attachment 8557921 [details] [diff] [review]:
-----------------------------------------------------------------

Nice, thanks!

::: js/public/CharacterEncoding.h
@@ +158,4 @@
>    public:
> +    ConstTwoByteChars() : Base() {}
> +    ConstTwoByteChars(char16_t *aChars, size_t aLength) : Base(aChars, aLength) {}
> +    ConstTwoByteChars(const char16_t *aChars, size_t aLength) : Base(aChars, aLength) {}

Nit: can we remove the constructor that takes non-const chars?
Attachment #8557921 - Flags: review?(jdemooij) → review+
Thank you for reviewing! :D
and sorry for the long delay, I forgot to add me to CC list.

https://hg.mozilla.org/integration/mozilla-inbound/rev/cb655f416527
https://hg.mozilla.org/mozilla-central/rev/cb655f416527
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: