Bug 864344 - Remove unused code for NS_Alloc failures in the cycle collector. r=smaug

This commit is contained in:
Andrew McCreight 2013-04-30 10:41:23 -07:00
Родитель dba6cce472
Коммит 3a107ba64a
1 изменённых файлов: 2 добавлений и 8 удалений

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

@ -523,10 +523,8 @@ public:
PtrInfo *Add(void *aPointer, nsCycleCollectionParticipant *aParticipant)
{
if (mNext == mBlockEnd) {
Block *block;
if (!(*mNextBlock = block =
static_cast<Block*>(NS_Alloc(sizeof(Block)))))
return nullptr;
Block *block = static_cast<Block*>(NS_Alloc(sizeof(Block)));
*mNextBlock = block;
mNext = block->mEntries;
mBlockEnd = block->mEntries + BlockSize;
block->mNext = nullptr;
@ -1878,10 +1876,6 @@ GCGraphBuilder::AddNode(void *s, nsCycleCollectionParticipant *aParticipant)
if (!e->mNode) {
// New entry.
result = mNodeBuilder.Add(s, aParticipant);
if (!result) {
PL_DHashTableRawRemove(&mPtrToNodeMap, e);
return nullptr;
}
e->mNode = result;
} else {
result = e->mNode;