Hold some strong references on nsRefreshDriver

This commit is contained in:
Moonchild 2022-10-26 08:05:04 +00:00 committed by roytam1
commit e69b52eac1
2 changed files with 6 additions and 3 deletions

View file

@ -212,9 +212,12 @@ SVGDocumentWrapper::TickRefreshDriver()
nsCOMPtr<nsIPresShell> presShell;
mViewer->GetPresShell(getter_AddRefs(presShell));
if (presShell) {
nsPresContext* presContext = presShell->GetPresContext();
RefPtr<nsPresContext> presContext = presShell->GetPresContext();
if (presContext) {
presContext->RefreshDriver()->DoTick();
RefPtr<nsRefreshDriver> driver = presContext->RefreshDriver();
if (driver) {
driver->DoTick();
}
}
}
}