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
parent 0a763ef5fd
commit ece84fb3a7
2 changed files with 1 additions and 7 deletions

View File

@ -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 =

View File

@ -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,