зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b4b306f879
Коммит
6df22de302
|
@ -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];
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче