зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1430687 - Move the mDestroyBlockedCount early return in nsDocumentViewer::Destroy to the top. r=bobowen
MozReview-Commit-ID: Exe0hIFHK8z
This commit is contained in:
Родитель
d75df097a4
Коммит
706256a2cc
|
@ -1655,6 +1655,14 @@ nsDocumentViewer::Destroy()
|
||||||
{
|
{
|
||||||
NS_ASSERTION(mDocument, "No document in Destroy()!");
|
NS_ASSERTION(mDocument, "No document in Destroy()!");
|
||||||
|
|
||||||
|
// Don't let the document get unloaded while we are printing.
|
||||||
|
// this could happen if we hit the back button during printing.
|
||||||
|
// We also keep the viewer from being cached in session history, since
|
||||||
|
// we require all documents there to be sanitized.
|
||||||
|
if (mDestroyBlockedCount != 0) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef NS_PRINTING
|
#ifdef NS_PRINTING
|
||||||
// Here is where we check to see if the document was still being prepared
|
// Here is where we check to see if the document was still being prepared
|
||||||
// for printing when it was asked to be destroy from someone externally
|
// for printing when it was asked to be destroy from someone externally
|
||||||
|
@ -1672,14 +1680,6 @@ nsDocumentViewer::Destroy()
|
||||||
mAutoBeforeAndAfterPrint = nullptr;
|
mAutoBeforeAndAfterPrint = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Don't let the document get unloaded while we are printing.
|
|
||||||
// this could happen if we hit the back button during printing.
|
|
||||||
// We also keep the viewer from being cached in session history, since
|
|
||||||
// we require all documents there to be sanitized.
|
|
||||||
if (mDestroyBlockedCount != 0) {
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we were told to put ourselves into session history instead of destroy
|
// If we were told to put ourselves into session history instead of destroy
|
||||||
// the presentation, do that now.
|
// the presentation, do that now.
|
||||||
if (mSHEntry) {
|
if (mSHEntry) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче