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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user