Bug 1457813 - Part 1: Replace asserting NS_PRECONDITIONs with NS_ASSERTIONs. r?froydnj
MozReview-Commit-ID: JMNmdne85lg
--- a/dom/base/nsIContentInlines.h
+++ b/dom/base/nsIContentInlines.h
@@ -28,18 +28,20 @@ nsIContent::IsInChromeDocument() const
{
return nsContentUtils::IsChromeDoc(OwnerDoc());
}
inline void
nsIContent::SetPrimaryFrame(nsIFrame* aFrame)
{
MOZ_ASSERT(IsInUncomposedDoc() || IsInShadowTree(), "This will end badly!");
- NS_PRECONDITION(!aFrame || !mPrimaryFrame || aFrame == mPrimaryFrame,
- "Losing track of existing primary frame");
+
+ // FIXME <map> bug 749326
+ NS_ASSERTION(!aFrame || !mPrimaryFrame || aFrame == mPrimaryFrame,
+ "Losing track of existing primary frame");
if (aFrame) {
if (MOZ_LIKELY(!IsHTMLElement(nsGkAtoms::area)) ||
aFrame->GetContent() == this) {
aFrame->SetIsPrimaryFrame(true);
}
} else if (nsIFrame* currentPrimaryFrame = GetPrimaryFrame()) {
if (MOZ_LIKELY(!IsHTMLElement(nsGkAtoms::area)) ||
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -2676,20 +2676,23 @@ void
PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty,
nsFrameState aBitToAdd,
ReflowRootHandling aRootHandling)
{
NS_PRECONDITION(aBitToAdd == NS_FRAME_IS_DIRTY ||
aBitToAdd == NS_FRAME_HAS_DIRTY_CHILDREN ||
!aBitToAdd,
"Unexpected bits being added");
- NS_PRECONDITION(!(aIntrinsicDirty == eStyleChange &&
- aBitToAdd == NS_FRAME_HAS_DIRTY_CHILDREN),
- "bits don't correspond to style change reason");
-
+
+ // FIXME removeAttribute bug 478135
+ NS_ASSERTION(!(aIntrinsicDirty == eStyleChange &&
+ aBitToAdd == NS_FRAME_HAS_DIRTY_CHILDREN),
+ "bits don't correspond to style change reason");
+
+ // FIXME bug 457400
NS_ASSERTION(!mIsReflowing, "can't mark frame dirty during reflow");
// If we've not yet done the initial reflow, then don't bother
// enqueuing a reflow command yet.
if (! mDidInitialize)
return;
// If we're already destroying, don't bother with this either.