| Index: ipc/attachment_broker.cc
|
| diff --git a/ipc/attachment_broker.cc b/ipc/attachment_broker.cc
|
| index 45fe1204681395aefc7218e8475dcdfbd784b2e4..df3e724632852d6299efb5ace06c096d1303327d 100644
|
| --- a/ipc/attachment_broker.cc
|
| +++ b/ipc/attachment_broker.cc
|
| @@ -58,6 +58,16 @@ void AttachmentBroker::AddObserver(
|
| info.runner = runner;
|
| info.unique_id = ++last_unique_id_;
|
| observers_.push_back(info);
|
| +
|
| + // Give the observer a chance to handle attachments that arrived while the
|
| + // observer was handling the message that caused it to register, but our
|
| + // mutex was not yet locked.
|
| + for (const auto& attachment : attachments_) {
|
| + info.runner->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&AttachmentBroker::NotifyObserver, base::Unretained(this),
|
| + info.unique_id, attachment->GetIdentifier()));
|
| + }
|
| }
|
| }
|
|
|
|
|