mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
Bug 803255. Ensure previous document viewer is cleared when creating a new one to avoid leaking the old one. r=bz
This commit is contained in:
parent
08e5b80f4e
commit
d158dec950
@ -909,6 +909,12 @@ DocumentViewerImpl::InitInternal(nsIWidget* aParentWidget,
|
||||
mPresContext->SetPageScale(1.0f);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
// Avoid leaking the old viewer.
|
||||
if (mPreviousViewer) {
|
||||
mPreviousViewer->Destroy();
|
||||
mPreviousViewer = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user