mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1257314
- Properly lock in IPC PeekMessages. r=dvander a=topcrash
MozReview-Commit-ID: 8iUVhiN9Ksk --HG-- extra : source : 186064e556caa51a3cb804e43ff7356b36e3e2f2
This commit is contained in:
parent
71900c9741
commit
c26878b866
@ -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