Bug 1851787 - Plumb a DestroyContext through all functions that can destroy frames. r=dholbert

This prevents anonymous content getting destroyed at weird times
during frame destruction.

Differential Revision: https://phabricator.services.mozilla.com/D187693
This commit is contained in:
Emilio Cobos Álvarez
2023-09-08 15:11:17 +00:00
parent cca6b1534e
commit 0b366c953e
59 changed files with 421 additions and 421 deletions

View File

@@ -998,7 +998,9 @@ void nsLineLayout::ReflowFrame(nsIFrame* aFrame, nsReflowStatus& aReflowStatus,
// Remove all of the childs next-in-flows. Make sure that we ask
// the right parent to do the removal (it's possible that the
// parent is not this because we are executing pullup code)
kidNextInFlow->GetParent()->DeleteNextInFlowChild(kidNextInFlow, true);
FrameDestroyContext context(aFrame->PresShell());
kidNextInFlow->GetParent()->DeleteNextInFlowChild(context,
kidNextInFlow, true);
}
}