mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
Bug 829954 - Part 1: Make AlignedArray fallible. r=jrmuizel
This commit is contained in:
parent
ab85da27f3
commit
0c97f0440c
@ -110,7 +110,7 @@ struct AlignedArray
|
||||
MOZ_ALWAYS_INLINE void Realloc(size_t aSize)
|
||||
{
|
||||
delete [] mStorage;
|
||||
mStorage = new T[aSize + (alignment - 1)];
|
||||
mStorage = new (std::nothrow) T[aSize + (alignment - 1)];
|
||||
if (uintptr_t(mStorage) % alignment) {
|
||||
// Our storage does not start at a <alignment>-byte boundary. Make sure mData does!
|
||||
mPtr = (uint32_t*)(uintptr_t(mStorage) +
|
||||
|
Loading…
Reference in New Issue
Block a user