mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
508f0d51de
WebGL objects keep an array of refptrs of other WebGL objects owning references to them. In practical cases, the size of this array can oscillate between 0 and 2 at high frequency. nsTArray throws away its whole storage (mHdr) when its size hits 0. This patch makes us use a nsAutoTArray with a pre-allocated size of 2 or 8 depending on WebGL object types.