Bug 1173195 - Don't assert success until successful in GMPSharedMemManager. r=edwin

This commit is contained in:
Chris Pearce 2015-07-16 16:53:39 +12:00
Родитель 8c024dd743
Коммит a4c7288fab
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -40,9 +40,9 @@ GMPSharedMemManager::MgrAllocShmem(GMPSharedMem::GMPMemoryClasses aClass, size_t
size_t pagesize = ipc::SharedMemory::SystemPageSize();
aSize = (aSize + (pagesize-1)) & ~(pagesize-1); // round up to page size
bool retval = Alloc(aSize, aType, aMem);
// The allocator (or NeedsShmem call) should never return less than we ask for...
MOZ_ASSERT(aMem->Size<uint8_t>() >= aSize);
if (retval) {
// The allocator (or NeedsShmem call) should never return less than we ask for...
MOZ_ASSERT(aMem->Size<uint8_t>() >= aSize);
mData->mGmpAllocated[aClass]++;
}
return retval;