From 328053742938509a200730dfde9586070e5b0d90 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 3 Aug 2013 14:11:06 +1000 Subject: [PATCH] Bug 899896 - Avoid null checking of some box layout factory functions. r=dbaron --- layout/xul/base/src/nsListBoxBodyFrame.cpp | 4 ---- layout/xul/grid/nsGridRowGroupFrame.cpp | 4 ---- layout/xul/grid/nsGridRowLeafFrame.cpp | 4 ---- 3 files changed, 12 deletions(-) diff --git a/layout/xul/base/src/nsListBoxBodyFrame.cpp b/layout/xul/base/src/nsListBoxBodyFrame.cpp index e00a5887f340..b192386f96b5 100644 --- a/layout/xul/base/src/nsListBoxBodyFrame.cpp +++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp @@ -1474,10 +1474,6 @@ nsIFrame* NS_NewListBoxBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { nsCOMPtr layout = NS_NewListBoxLayout(); - if (!layout) { - return nullptr; - } - return new (aPresShell) nsListBoxBodyFrame(aPresShell, aContext, layout); } diff --git a/layout/xul/grid/nsGridRowGroupFrame.cpp b/layout/xul/grid/nsGridRowGroupFrame.cpp index 9faf35e87cad..c9aad3803587 100644 --- a/layout/xul/grid/nsGridRowGroupFrame.cpp +++ b/layout/xul/grid/nsGridRowGroupFrame.cpp @@ -23,10 +23,6 @@ NS_NewGridRowGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { nsCOMPtr layout = NS_NewGridRowGroupLayout(); - if (!layout) { - return nullptr; - } - return new (aPresShell) nsGridRowGroupFrame(aPresShell, aContext, layout); } diff --git a/layout/xul/grid/nsGridRowLeafFrame.cpp b/layout/xul/grid/nsGridRowLeafFrame.cpp index c418c07428e7..6dd6ed19447f 100644 --- a/layout/xul/grid/nsGridRowLeafFrame.cpp +++ b/layout/xul/grid/nsGridRowLeafFrame.cpp @@ -23,10 +23,6 @@ NS_NewGridRowLeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { nsCOMPtr layout = NS_NewGridRowLeafLayout(); - if (!layout) { - return nullptr; - } - return new (aPresShell) nsGridRowLeafFrame(aPresShell, aContext, false, layout); }