Bug 1278796, part 3 - Inline StartBlock. r=smaug

This method doesn't do much, and in a later patch it will do even
less.
This commit is contained in:
Andrew McCreight 2016-06-10 09:17:57 -07:00
Родитель 6e83659330
Коммит 21a0cf7d40
1 изменённых файлов: 4 добавлений и 10 удалений

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

@ -1064,15 +1064,8 @@ public:
void InitBlocks() void InitBlocks()
{ {
mCount = 0; mCount = 0;
mFreeList = nullptr; mFreeList = mFirstBlock.mEntries;
StartBlock(&mFirstBlock); mFirstBlock.InitNextPointers();
}
void StartBlock(PurpleBlock* aBlock)
{
MOZ_ASSERT(!mFreeList, "should not have free list");
mFreeList = aBlock->mEntries;
aBlock->InitNextPointers();
} }
void FreeBlocks() void FreeBlocks()
@ -1130,7 +1123,8 @@ public:
{ {
if (MOZ_UNLIKELY(!mFreeList)) { if (MOZ_UNLIKELY(!mFreeList)) {
PurpleBlock* b = new PurpleBlock; PurpleBlock* b = new PurpleBlock;
StartBlock(b); mFreeList = b->mEntries;
b->InitNextPointers();
// Add the new block as the second block in the list. // Add the new block as the second block in the list.
b->mNext = mFirstBlock.mNext; b->mNext = mFirstBlock.mNext;