mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
Disable rendering during presentation tear down
This commit is contained in:
parent
4b46397958
commit
0227e28077
@ -536,18 +536,26 @@ PresShell::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
PresShell::~PresShell()
|
||||
{
|
||||
mRefCnt = 99;/* XXX hack! get around re-entrancy bugs */
|
||||
|
||||
mIsDestroying = PR_TRUE;
|
||||
if (mViewManager) {
|
||||
// Disable paints during tear down of the frame tree
|
||||
mViewManager->DisableRefresh();
|
||||
}
|
||||
if (nsnull != mRootFrame) {
|
||||
mRootFrame->DeleteFrame(*mPresContext);
|
||||
}
|
||||
NS_IF_RELEASE(mViewManager);
|
||||
//Release mPresContext after mViewManager
|
||||
|
||||
//Note: Release mPresContext after mViewManager
|
||||
// XXX why?
|
||||
NS_IF_RELEASE(mPresContext);
|
||||
NS_IF_RELEASE(mStyleSet);
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->DeleteShell(this);
|
||||
NS_RELEASE(mDocument);
|
||||
}
|
||||
|
||||
mRefCnt = 0;
|
||||
delete mPlaceholderMap;
|
||||
}
|
||||
|
@ -536,18 +536,26 @@ PresShell::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
PresShell::~PresShell()
|
||||
{
|
||||
mRefCnt = 99;/* XXX hack! get around re-entrancy bugs */
|
||||
|
||||
mIsDestroying = PR_TRUE;
|
||||
if (mViewManager) {
|
||||
// Disable paints during tear down of the frame tree
|
||||
mViewManager->DisableRefresh();
|
||||
}
|
||||
if (nsnull != mRootFrame) {
|
||||
mRootFrame->DeleteFrame(*mPresContext);
|
||||
}
|
||||
NS_IF_RELEASE(mViewManager);
|
||||
//Release mPresContext after mViewManager
|
||||
|
||||
//Note: Release mPresContext after mViewManager
|
||||
// XXX why?
|
||||
NS_IF_RELEASE(mPresContext);
|
||||
NS_IF_RELEASE(mStyleSet);
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->DeleteShell(this);
|
||||
NS_RELEASE(mDocument);
|
||||
}
|
||||
|
||||
mRefCnt = 0;
|
||||
delete mPlaceholderMap;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user