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

MozReview-Commit-ID: 8iUVhiN9Ksk

--HG--
extra : source : 186064e556caa51a3cb804e43ff7356b36e3e2f2
This commit is contained in:
Benoit Girard 2016-03-16 17:15:38 -04:00
parent 71900c9741
commit c26878b866

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;