From 37f2db0eb65adbdf58f3d00cd7f568304d1446e1 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Wed, 11 Mar 2026 23:24:08 +0800 Subject: [PATCH] import from UXP: No issue - Fix some fatal printing assertions. (01b4ef07) --- gfx/thebes/PrintTarget.cpp | 2 +- layout/tables/nsTableFrame.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/gfx/thebes/PrintTarget.cpp b/gfx/thebes/PrintTarget.cpp index a5ad5574a..ea7ac6a1f 100644 --- a/gfx/thebes/PrintTarget.cpp +++ b/gfx/thebes/PrintTarget.cpp @@ -65,7 +65,7 @@ PrintTarget::MakeDrawTarget(const IntSize& aSize, // This should not be called outside of BeginPage()/EndPage() calls since // some backends can only provide a valid DrawTarget at that time. - MOZ_ASSERT(mHasActivePage, "We can't guarantee a valid DrawTarget"); + NS_WARNING_ASSERTION(mHasActivePage, "We can't guarantee a valid DrawTarget without an active page. Content may be missing."); if (cairo_surface_status(mCairoSurface)) { return nullptr; diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index e37cebc91..a5745103d 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -74,9 +74,6 @@ class nsDisplayTableBackgroundSet { nsDisplayTableBackgroundSet(nsDisplayListBuilder* aBuilder, nsIFrame* aTable) : mBuilder(aBuilder) { mPrevTableBackgroundSet = mBuilder->SetTableBackgroundSet(this); - mozilla::DebugOnly reference = - mBuilder->FindReferenceFrameFor(aTable, &mToReferenceFrame); - MOZ_ASSERT(nsLayoutUtils::IsAncestorFrameCrossDoc(reference, aTable)); mDirtyRect = mBuilder->GetDirtyRect(); }