diff --git a/layout/xul/base/src/nsImageBoxFrame.cpp b/layout/xul/base/src/nsImageBoxFrame.cpp index db4e3001df2..6c839e23d11 100644 --- a/layout/xul/base/src/nsImageBoxFrame.cpp +++ b/layout/xul/base/src/nsImageBoxFrame.cpp @@ -477,7 +477,9 @@ nsImageBoxFrame::GetPrefSize(nsBoxLayoutState& aState) AddInset(size); nsIBox::AddCSSPrefSize(aState, this, size); - BoundsCheck(GetMinSize(aState), size, GetMaxSize(aState)); + nsSize minSize = GetMinSize(aState); + nsSize maxSize = GetMaxSize(aState); + BoundsCheck(minSize, size, maxSize); return size; } diff --git a/layout/xul/base/src/nsLeafBoxFrame.cpp b/layout/xul/base/src/nsLeafBoxFrame.cpp index 5086a189887..b4535222d05 100644 --- a/layout/xul/base/src/nsLeafBoxFrame.cpp +++ b/layout/xul/base/src/nsLeafBoxFrame.cpp @@ -304,7 +304,9 @@ nsLeafBoxFrame::Reflow(nsPresContext* aPresContext, // if we are told to layout intrinic then get our preferred size. if (computedSize.width == NS_INTRINSICSIZE || computedSize.height == NS_INTRINSICSIZE) { prefSize = GetPrefSize(state); - BoundsCheck(GetMinSize(state), prefSize, GetMaxSize(state)); + nsSize minSize = GetMinSize(state); + nsSize maxSize = GetMaxSize(state); + BoundsCheck(minSize, prefSize, maxSize); } // get our desiredSize