Bug 969165 - Convert Atomic<T> where T != bool but is used as a bool over to Atomic<bool>, now that it's supported, in widget/. r=vlad

--HG--
extra : rebase_source : 29bf1f696e8952ea7056d2417522dcc0f88cecc4
This commit is contained in:
Jeff Walden 2014-02-06 22:17:07 -08:00
Родитель 4e3e68dab2
Коммит d1872d42a6
2 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -23,7 +23,7 @@ nsBaseAppShell::nsBaseAppShell()
, mEventloopNestingLevel(0)
, mBlockedWait(nullptr)
, mFavorPerf(0)
, mNativeEventPending(0)
, mNativeEventPending(false)
, mStarvationDelay(0)
, mSwitchTime(0)
, mLastNativeEventTime(0)
@ -61,7 +61,7 @@ nsBaseAppShell::Init()
void
nsBaseAppShell::NativeEventCallback()
{
if (!mNativeEventPending.exchange(0))
if (!mNativeEventPending.exchange(false))
return;
// If DoProcessNextNativeEvent is on the stack, then we assume that we can
@ -106,7 +106,7 @@ nsBaseAppShell::NativeEventCallback()
}
// Note, this is currently overidden on windows, see comments in nsAppShell for
// details.
// details.
void
nsBaseAppShell::DoProcessMoreGeckoEvents()
{
@ -225,7 +225,7 @@ nsBaseAppShell::OnDispatchedEvent(nsIThreadInternal *thr)
if (mBlockNativeEvent)
return NS_OK;
if (mNativeEventPending.exchange(1))
if (mNativeEventPending.exchange(true))
return NS_OK;
// Returns on the main thread in NativeEventCallback above
@ -402,7 +402,7 @@ nsBaseAppShell::AfterProcessNextEvent(nsIThreadInternal *thr,
uint32_t recursionDepth,
bool eventWasProcessed)
{
// We've just finished running an event, so we're in a stable state.
// We've just finished running an event, so we're in a stable state.
RunSyncSections(true, recursionDepth);
return NS_OK;
}

Просмотреть файл

@ -120,7 +120,7 @@ private:
*/
bool *mBlockedWait;
int32_t mFavorPerf;
mozilla::Atomic<uint32_t> mNativeEventPending;
mozilla::Atomic<bool> mNativeEventPending;
PRIntervalTime mStarvationDelay;
PRIntervalTime mSwitchTime;
PRIntervalTime mLastNativeEventTime;
@ -147,7 +147,7 @@ private:
* Tracks whether we have processed any gecko events in NativeEventCallback so
* that we can avoid erroneously entering a blocking loop waiting for gecko
* events to show up during OnProcessNextEvent. This is required because on
* OS X ProcessGeckoEvents may be invoked inside the context of
* OS X ProcessGeckoEvents may be invoked inside the context of
* ProcessNextNativeEvent and may result in NativeEventCallback being invoked
* and in turn invoking NS_ProcessPendingEvents. Because
* ProcessNextNativeEvent may be invoked prior to the NS_HasPendingEvents