Fix some debug assertions.

refactored code porting in assertions causing debug build failures.
This commit is contained in:
Moonchild 2022-10-03 20:00:02 +00:00 • committed by roytam1
commit 1868e88741
7 changed files with 7 additions and 9 deletions

View file

@ -361,7 +361,6 @@ class JSFunction : public js::NativeObject
MOZ_ASSERT(!hasCompileTimeName()); MOZ_ASSERT(!hasCompileTimeName());
MOZ_ASSERT(!hasGuessedAtom()); MOZ_ASSERT(!hasGuessedAtom());
MOZ_ASSERT(!isBoundFunction()); MOZ_ASSERT(!isBoundFunction());
MOZ_ASSERT(js::AtomIsMarked(zone(), atom));
atom_ = atom; atom_ = atom;
flags_ |= HAS_GUESSED_ATOM; flags_ |= HAS_GUESSED_ATOM;
} }

View file

@ -5887,7 +5887,6 @@ nsGridContainerFrame::ReflowChildren(GridReflowInput& aState,
nsReflowStatus& aStatus) nsReflowStatus& aStatus)
{ {
MOZ_ASSERT(aState.mReflowInput); MOZ_ASSERT(aState.mReflowInput);
MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
aStatus = NS_FRAME_COMPLETE; aStatus = NS_FRAME_COMPLETE;
nsOverflowAreas ocBounds; nsOverflowAreas ocBounds;

View file

@ -91,7 +91,7 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, 0, 0, FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, 0, 0,
ReflowChildFlags::Default); ReflowChildFlags::Default);
NS_ASSERTION(aPresContext->IsDynamic() || !aStatus.IsFullyComplete() || NS_ASSERTION(aPresContext->IsDynamic() || !NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
!frame->GetNextInFlow(), !frame->GetNextInFlow(),
"bad child flow list"); "bad child flow list");
} }

View file

@ -148,7 +148,7 @@ nsPageFrame::Reflow(nsPresContext* aPresContext,
FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, xc, FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, xc,
yc, ReflowChildFlags::Default); yc, ReflowChildFlags::Default);
NS_ASSERTION(!aStatus.IsFullyComplete() || !frame->GetNextInFlow(), NS_ASSERTION(!NS_FRAME_IS_FULLY_COMPLETE(aStatus) || !frame->GetNextInFlow(),
"bad child flow list"); "bad child flow list");
} }
PR_PL(("PageFrame::Reflow %p ", this)); PR_PL(("PageFrame::Reflow %p ", this));

View file

@ -337,7 +337,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowInput, ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowInput,
posterRenderRect.x, posterRenderRect.y, posterRenderRect.x, posterRenderRect.y,
ReflowChildFlags::Default, childStatus); ReflowChildFlags::Default, childStatus);
MOZ_ASSERT(childStatus.IsFullyComplete(), MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
"We gave our child unconstrained available block-size, " "We gave our child unconstrained available block-size, "
"so it should be complete!"); "so it should be complete!");
@ -380,7 +380,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
ReflowChild(child, aPresContext, kidDesiredSize, kidReflowInput, ReflowChild(child, aPresContext, kidDesiredSize, kidReflowInput,
mBorderPadding.left, mBorderPadding.top, mBorderPadding.left, mBorderPadding.top,
ReflowChildFlags::Default, childStatus); ReflowChildFlags::Default, childStatus);
MOZ_ASSERT(childStatus.IsFullyComplete(), MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
"We gave our child unconstrained available block-size, " "We gave our child unconstrained available block-size, "
"so it should be complete!"); "so it should be complete!");

View file

@ -351,13 +351,13 @@ private:
void OnMsgInputPending() void OnMsgInputPending()
{ {
MOZ_ASSERT(OnSocketThread(), "not on socket thread"); NS_ASSERTION(PR_GetCurrentThread() == gSocketThread, "not on socket thread");
if (mState == STATE_TRANSFERRING) if (mState == STATE_TRANSFERRING)
mPollFlags |= (PR_POLL_READ | PR_POLL_EXCEPT); mPollFlags |= (PR_POLL_READ | PR_POLL_EXCEPT);
} }
void OnMsgOutputPending() void OnMsgOutputPending()
{ {
MOZ_ASSERT(OnSocketThread(), "not on socket thread"); NS_ASSERTION(PR_GetCurrentThread() == gSocketThread, "not on socket thread");
if (mState == STATE_TRANSFERRING) if (mState == STATE_TRANSFERRING)
mPollFlags |= (PR_POLL_WRITE | PR_POLL_EXCEPT); mPollFlags |= (PR_POLL_WRITE | PR_POLL_EXCEPT);
} }

View file

@ -2630,7 +2630,7 @@ nsHttpConnectionMgr::OnMsgCompleteUpgrade(int32_t, ARefBase *param)
void void
nsHttpConnectionMgr::OnMsgUpdateParam(int32_t inParam, ARefBase *) nsHttpConnectionMgr::OnMsgUpdateParam(int32_t inParam, ARefBase *)
{ {
MOZ_ASSERT(OnSocketThread(), "not on socket thread"); NS_ASSERTION(PR_GetCurrentThread() == gSocketThread, "not on socket thread");
uint32_t param = static_cast<uint32_t>(inParam); uint32_t param = static_cast<uint32_t>(inParam);
uint16_t name = ((param) & 0xFFFF0000) >> 16; uint16_t name = ((param) & 0xFFFF0000) >> 16;
uint16_t value = param & 0x0000FFFF; uint16_t value = param & 0x0000FFFF;