Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 21c9ba6

Browse files
committed
Bug 1568950 - Part 2: Record use counters for SVG image when the image is going to be discarded; r=smaug
Part-1 patch (moving ReportUseCounters call to Document::Destroy) doesn't help SVG image case because the SVGDocumentWrapper::DestroyViewer() still happens too late. Differential Revision: https://phabricator.services.mozilla.com/D42368 --HG-- extra : moz-landing-system : lando
1 parent da423b7 commit 21c9ba6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

image/VectorImage.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,10 @@ VectorImage::RequestDiscard() {
12831283
mProgressTracker->OnDiscard();
12841284
}
12851285

1286+
if (Document* doc = mSVGDocumentWrapper->GetDocument()) {
1287+
doc->ReportUseCounters();
1288+
}
1289+
12861290
return NS_OK;
12871291
}
12881292

0 commit comments

Comments
 (0)