bug 75661, crash when image-manager alert box appears, r=kmcclusk, sr=roc+moz
git-svn-id: svn://10.0.0.236/trunk@92429 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
331d5f10a8
commit
8d0292bd09
@ -426,6 +426,7 @@ nsViewManager::nsViewManager()
|
||||
mAllowDoubleBuffering = PR_TRUE;
|
||||
mHasPendingInvalidates = PR_FALSE;
|
||||
mPendingInvalidateEvent = PR_FALSE;
|
||||
mRecursiveRefreshPending = PR_FALSE;
|
||||
}
|
||||
|
||||
nsViewManager::~nsViewManager()
|
||||
@ -693,6 +694,10 @@ void nsViewManager::Refresh(nsIView *aView, nsIRenderingContext *aContext, nsIRe
|
||||
#endif
|
||||
|
||||
NS_ASSERTION(!(PR_TRUE == mPainting), "recursive painting not permitted");
|
||||
if (mPainting) {
|
||||
mRecursiveRefreshPending = PR_TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
mPainting = PR_TRUE;
|
||||
|
||||
@ -790,6 +795,11 @@ void nsViewManager::Refresh(nsIView *aView, nsIRenderingContext *aContext, nsIRe
|
||||
}
|
||||
}
|
||||
|
||||
if (mRecursiveRefreshPending) {
|
||||
UpdateAllViews(aUpdateFlags);
|
||||
mRecursiveRefreshPending = PR_FALSE;
|
||||
}
|
||||
|
||||
#ifdef NS_VM_PERF_METRICS
|
||||
MOZ_TIMER_DEBUGLOG(("Stop: nsViewManager::Refresh(region), this=%p\n", this));
|
||||
MOZ_TIMER_STOP(mWatch);
|
||||
@ -817,6 +827,10 @@ void nsViewManager::Refresh(nsIView *aView, nsIRenderingContext *aContext, const
|
||||
#endif
|
||||
|
||||
NS_ASSERTION(!(PR_TRUE == mPainting), "recursive painting not permitted");
|
||||
if (mPainting) {
|
||||
mRecursiveRefreshPending = PR_TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
mPainting = PR_TRUE;
|
||||
|
||||
@ -920,6 +934,11 @@ void nsViewManager::Refresh(nsIView *aView, nsIRenderingContext *aContext, const
|
||||
}
|
||||
}
|
||||
|
||||
if (mRecursiveRefreshPending) {
|
||||
UpdateAllViews(aUpdateFlags);
|
||||
mRecursiveRefreshPending = PR_FALSE;
|
||||
}
|
||||
|
||||
#ifdef NS_VM_PERF_METRICS
|
||||
MOZ_TIMER_DEBUGLOG(("Stop: nsViewManager::Refresh(region), this=%p\n", this));
|
||||
MOZ_TIMER_STOP(mWatch);
|
||||
|
||||
@ -316,6 +316,7 @@ private:
|
||||
PRInt32 mTransCnt;
|
||||
PRBool mRefreshEnabled;
|
||||
PRBool mPainting;
|
||||
PRBool mRecursiveRefreshPending;
|
||||
nsIView *mMouseGrabber;
|
||||
nsIView *mKeyGrabber;
|
||||
PRInt32 mUpdateCnt;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user