Bug 899389 - Don't null check result of NS_NewStyleContext. r=dbaron

This commit is contained in:
Cameron McCormack 2013-07-31 10:52:32 +10:00
parent ed76cd5ffe
commit 5ecbce73bd

View File

@ -790,16 +790,11 @@ nsStyleSet::GetContext(nsStyleContext* aParentContext,
if (!result) {
result = NS_NewStyleContext(aParentContext, aPseudoTag, aPseudoType,
aRuleNode, aFlags & eSkipFlexItemStyleFixup);
if (!result)
return nullptr;
if (aVisitedRuleNode) {
nsRefPtr<nsStyleContext> resultIfVisited =
NS_NewStyleContext(parentIfVisited, aPseudoTag, aPseudoType,
aVisitedRuleNode,
aFlags & eSkipFlexItemStyleFixup);
if (!resultIfVisited) {
return nullptr;
}
if (!parentIfVisited) {
mRoots.AppendElement(resultIfVisited);
}