Make nsBidi use nsTArray instead of manual malloc/realloc

NEW
Unassigned

Status

()

Core
Layout: Block and Inline
--
enhancement
3 years ago
3 years ago

People

(Reporter: mats, Unassigned)

Tracking

({perf, sec-want})

Trunk
perf, sec-want
Points:
---

Firefox Tracking Flags

(firefox41 affected)

Details

(Reporter)

Description

3 years ago
I think we should try to make these members nsTArrays:
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsBidi.h#880
They're currently allocated using malloc/realloc and we write to them
without any bounds-checks.  Using nsTArray is safer and might also be
more performant if we can avoid copying data unnecessarily:
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsBidi.cpp#191
(using ClearAndRetainStorage+SetCapacity might avoid that)
You need to log in before you can comment on or make changes to this bug.