mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1257314
- Properly lock in IPC PeekMessages. r=dvander
MozReview-Commit-ID: 8iUVhiN9Ksk --HG-- extra : rebase_source : 294ac0a929ef5fcb889d5fbab4ecacdcbc9ffdf0
This commit is contained in:
parent
fef3d844c0
commit
26e520518f
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user