зеркало из https://github.com/mozilla/pjs.git
Work around a crash by stubbing out some pointers that are weak links that are not to be used during shutdown
This commit is contained in:
Родитель
99ae91f493
Коммит
81fc79eab8
|
@ -506,19 +506,28 @@ PresShell::~PresShell()
|
||||||
|
|
||||||
mIsDestroying = PR_TRUE;
|
mIsDestroying = PR_TRUE;
|
||||||
|
|
||||||
|
// Clobber weak leaks in case of re-entrancy during tear down
|
||||||
|
mHistoryState = nsnull;
|
||||||
|
|
||||||
NS_IF_RELEASE(mCurrentEventContent);
|
NS_IF_RELEASE(mCurrentEventContent);
|
||||||
|
|
||||||
if (mViewManager) {
|
if (mViewManager) {
|
||||||
// Disable paints during tear down of the frame tree
|
// Disable paints during tear down of the frame tree
|
||||||
mViewManager->DisableRefresh();
|
mViewManager->DisableRefresh();
|
||||||
|
mViewManager = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the frame manager before destroying the frame hierarchy. That way
|
// Destroy the frame manager before destroying the frame hierarchy. That way
|
||||||
// we won't waste time removing content->frame mappings for frames being
|
// we won't waste time removing content->frame mappings for frames being
|
||||||
// destroyed
|
// destroyed
|
||||||
NS_IF_RELEASE(mFrameManager);
|
NS_IF_RELEASE(mFrameManager);
|
||||||
if (mRootFrame)
|
if (mRootFrame) {
|
||||||
mRootFrame->Destroy(*mPresContext);
|
mRootFrame->Destroy(*mPresContext);
|
||||||
if (mDocument)
|
}
|
||||||
|
|
||||||
|
if (mDocument) {
|
||||||
mDocument->DeleteShell(this);
|
mDocument->DeleteShell(this);
|
||||||
|
}
|
||||||
mRefCnt = 0;
|
mRefCnt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -506,19 +506,28 @@ PresShell::~PresShell()
|
||||||
|
|
||||||
mIsDestroying = PR_TRUE;
|
mIsDestroying = PR_TRUE;
|
||||||
|
|
||||||
|
// Clobber weak leaks in case of re-entrancy during tear down
|
||||||
|
mHistoryState = nsnull;
|
||||||
|
|
||||||
NS_IF_RELEASE(mCurrentEventContent);
|
NS_IF_RELEASE(mCurrentEventContent);
|
||||||
|
|
||||||
if (mViewManager) {
|
if (mViewManager) {
|
||||||
// Disable paints during tear down of the frame tree
|
// Disable paints during tear down of the frame tree
|
||||||
mViewManager->DisableRefresh();
|
mViewManager->DisableRefresh();
|
||||||
|
mViewManager = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the frame manager before destroying the frame hierarchy. That way
|
// Destroy the frame manager before destroying the frame hierarchy. That way
|
||||||
// we won't waste time removing content->frame mappings for frames being
|
// we won't waste time removing content->frame mappings for frames being
|
||||||
// destroyed
|
// destroyed
|
||||||
NS_IF_RELEASE(mFrameManager);
|
NS_IF_RELEASE(mFrameManager);
|
||||||
if (mRootFrame)
|
if (mRootFrame) {
|
||||||
mRootFrame->Destroy(*mPresContext);
|
mRootFrame->Destroy(*mPresContext);
|
||||||
if (mDocument)
|
}
|
||||||
|
|
||||||
|
if (mDocument) {
|
||||||
mDocument->DeleteShell(this);
|
mDocument->DeleteShell(this);
|
||||||
|
}
|
||||||
mRefCnt = 0;
|
mRefCnt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче