Bug 1538768 - Also zero-initialize primitive types in NonDefaultRenderRootArray. r=dthayer

Differential Revision: https://phabricator.services.mozilla.com/D24951

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2019-03-27 11:11:14 +00:00
Родитель b4b306f879
Коммит 6df22de302
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -115,6 +115,13 @@ template <typename T>
class NonDefaultRenderRootArray : public Array<T, kRenderRootCount - 1> {
typedef Array<T, kRenderRootCount - 1> Super;
public:
NonDefaultRenderRootArray() {
// See RenderRootArray constructor
if (IsPod<T>::value) {
PodArrayZero(*this);
}
}
T& operator[](wr::RenderRoot aIndex) {
return (*(Super*)this)[(size_t)aIndex - 1];
}