Bug 1113010 (part 0) - Remove impossible path in AddFrameConstruct(). r=dholbert.

Infallible new ensures that |item| is always non-null. And even if it didn't,
AppendItem() dereferences |item| before this code is reached.

--HG--
extra : rebase_source : 9abb8704ba03f455d6b77c5735fcb6cde4f8fef8
This commit is contained in:
Nicholas Nethercote 2014-12-18 14:14:31 -08:00
Родитель 6b5de8498e
Коммит 208ab0c4e1
2 изменённых файлов: 1 добавлений и 7 удалений

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

@ -5691,13 +5691,6 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
aItems.AppendItem(data, aContent, aTag, aNameSpaceID,
pendingBinding, styleContext.forget(),
aSuppressWhiteSpaceOptimizations, aAnonChildren);
if (!item) {
if (isGeneratedContent) {
aContent->UnbindFromTree();
}
return;
}
item->mIsText = isText;
item->mIsGeneratedContent = isGeneratedContent;
item->mIsAnonymousContentCreatorContent =

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

@ -831,6 +831,7 @@ private:
// aSuppressWhiteSpaceOptimizations is true if optimizations that
// skip constructing whitespace frames for this item or items
// around it cannot be performed.
// Also, the return value is always non-null, thanks to infallible 'new'.
FrameConstructionItem* AppendItem(const FrameConstructionData* aFCData,
nsIContent* aContent,
nsIAtom* aTag,