Try to fix orange: sGlobalObserver can get set during event processing, not

just unset.  Bug 326777


git-svn-id: svn://10.0.0.236/trunk@229659 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2007-07-11 03:01:56 +00:00
parent d8f73b13b2
commit 828996fdac

View File

@@ -467,7 +467,8 @@ nsThread::ProcessNextEvent(PRBool mayWait, PRBool *result)
NS_ENSURE_STATE(PR_GetCurrentThread() == mThread);
if (sGlobalObserver)
PRBool notifyGlobalObserver = (sGlobalObserver != nsnull);
if (notifyGlobalObserver)
sGlobalObserver->OnProcessNextEvent(this, mayWait && !ShuttingDown(),
mRunningEvent);
@@ -496,7 +497,7 @@ nsThread::ProcessNextEvent(PRBool mayWait, PRBool *result)
if (obs)
obs->AfterProcessNextEvent(this, mRunningEvent);
if (sGlobalObserver)
if (notifyGlobalObserver && sGlobalObserver)
sGlobalObserver->AfterProcessNextEvent(this, mRunningEvent);
return rv;