зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
6b5de8498e
Коммит
208ab0c4e1
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче