зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1173195 - Don't assert success until successful in GMPSharedMemManager. r=edwin
This commit is contained in:
Родитель
8c024dd743
Коммит
a4c7288fab
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче