Bug 1851868 - Refactor nsIFrame::Destroy to pass a single DestroyContext parameter. r=dholbert
This shouldn't change behavior, but it packs the two arguments to DestroyFrom into a single thing, and makes nsIFrame::Destroy not so easy to call without a previous context. This is a prerequisite to pass aDestroyContext to various things that right now just mint one, which can cause badness, see bug 1851787 and related bugs. It's also a bit nicer to add things there if we need to in the future. Differential Revision: https://phabricator.services.mozilla.com/D187578
This commit is contained in:
@@ -121,8 +121,7 @@ void SVGImageFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||
}
|
||||
|
||||
/* virtual */
|
||||
void SVGImageFrame::DestroyFrom(nsIFrame* aDestructRoot,
|
||||
PostDestroyData& aPostDestroyData) {
|
||||
void SVGImageFrame::Destroy(DestroyContext& aContext) {
|
||||
if (HasAnyStateBits(NS_FRAME_IS_NONDISPLAY)) {
|
||||
DecApproximateVisibleCount();
|
||||
}
|
||||
@@ -139,7 +138,7 @@ void SVGImageFrame::DestroyFrom(nsIFrame* aDestructRoot,
|
||||
imageLoader->FrameDestroyed(this);
|
||||
}
|
||||
|
||||
nsIFrame::DestroyFrom(aDestructRoot, aPostDestroyData);
|
||||
nsIFrame::Destroy(aContext);
|
||||
}
|
||||
|
||||
/* virtual */
|
||||
|
||||
Reference in New Issue
Block a user