Bug 538918 - follow up patch: IsMessagePending should use PeekMessage, not the stacks for detection.

--HG--
extra : transplant_source : %3D%E4_%CE7m%FE%8F%B0S%DC%9F%FAF%D7%40%5D%83%C1/
This commit is contained in:
Jim Mathies 2010-02-09 22:47:44 -06:00
Родитель 52f8f2919a
Коммит 02e1abfaad
1 изменённых файлов: 4 добавлений и 13 удалений

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

@ -595,20 +595,11 @@ RPCChannel::SpinInternalEventLoop()
bool
RPCChannel::IsMessagePending()
{
MutexAutoLock lock(mMutex);
if (mStack.empty())
MSG msg = { 0 };
if (PeekMessageW(&msg, (HWND)-1, gEventLoopMessage, gEventLoopMessage,
PM_REMOVE)) {
return true;
MessageMap::iterator it = mOutOfTurnReplies.find(mStack.top().seqno());
if (!mOutOfTurnReplies.empty() &&
it != mOutOfTurnReplies.end() &&
it->first == mStack.top().seqno())
return true;
if (!mPending.empty() &&
mPending.front().seqno() == mStack.top().seqno())
return true;
}
return false;
}