Sanitize CJBig2_SymbolDict's memory usage.
authorLei Zhang <thestig@chromium.org>
Fri, 9 Oct 2015 20:51:05 +0000 (13:51 -0700)
committerLei Zhang <thestig@chromium.org>
Fri, 9 Oct 2015 20:51:05 +0000 (13:51 -0700)
commit3acb1ef909a22368507ed13817c4988c818e3aee
treec5fcef7a3f30562c2bfc6118c818eb120211687c
parentfd751f28cecce61ab36038799043639d570e0b26
Sanitize CJBig2_SymbolDict's memory usage.

- Use std::vector<JBig2ArithCtx> instead of storing pointers to arrays.
- Make CJBig2_SymbolDict's members private with accessors.
- Use std::vector<JBig2ArithCtx> in related places.
- Steal Chromium's vector_as_array() and use it as an adaptor as needed.

BUG=514891
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1388203003 .
core/src/fxcodec/jbig2/JBig2_Context.cpp
core/src/fxcodec/jbig2/JBig2_SddProc.cpp
core/src/fxcodec/jbig2/JBig2_SddProc.h
core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
core/src/fxcodec/jbig2/JBig2_SymbolDict.h
third_party/BUILD.gn
third_party/base/stl_util.h [new file with mode: 0644]
third_party/third_party.gyp