Bug 1257314 - Properly lock in IPC PeekMessages. r=dvander

MozReview-Commit-ID: 8iUVhiN9Ksk

--HG--
extra : rebase_source : 294ac0a929ef5fcb889d5fbab4ecacdcbc9ffdf0
This commit is contained in:
Benoit Girard 2016-03-16 17:15:38 -04:00
parent fef3d844c0
commit 26e520518f

View File

@ -976,7 +976,10 @@ MessageChannel::OnMessageReceivedFromLink(const Message& aMsg)
}
void
MessageChannel::PeekMessages(msgid_t aMsgId, mozilla::function<void(const Message& aMsg)> aInvoke) {
MessageChannel::PeekMessages(msgid_t aMsgId, mozilla::function<void(const Message& aMsg)> aInvoke)
{
MonitorAutoLock lock(*mMonitor);
for (MessageQueue::iterator it = mPending.begin(); it != mPending.end(); it++) {
Message &msg = *it;