mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 10:27:03 +00:00
Bug 1467483 - Assert that PresArena is only used on the main thread. r=mattwoodrow
This commit is contained in:
parent
3a86240943
commit
b6ef1b3ae7
@ -86,6 +86,7 @@ nsPresArena::ClearArenaRefPtrs(ArenaObjectID aObjectID)
|
||||
void*
|
||||
nsPresArena::Allocate(uint32_t aCode, size_t aSize)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aSize > 0, "PresArena cannot allocate zero bytes");
|
||||
MOZ_ASSERT(aCode < ArrayLength(mFreeLists));
|
||||
|
||||
@ -150,6 +151,7 @@ nsPresArena::Allocate(uint32_t aCode, size_t aSize)
|
||||
void
|
||||
nsPresArena::Free(uint32_t aCode, void* aPtr)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aCode < ArrayLength(mFreeLists));
|
||||
|
||||
// Try to recycle this entry.
|
||||
|
Loading…
x
Reference in New Issue
Block a user