Open Bug 1167149 Opened 10 years ago Updated 3 years ago

Make nsBidi use nsTArray instead of manual malloc/realloc

Categories

(Core :: Layout: Block and Inline, enhancement)

enhancement

Tracking

()

Tracking Status
firefox41 --- affected

People

(Reporter: MatsPalmgren_bugz, Unassigned)

Details

(Keywords: perf, sec-want)

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)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.