| Index: mojo/edk/system/node_controller.h
|
| diff --git a/mojo/edk/system/node_controller.h b/mojo/edk/system/node_controller.h
|
| index c96b4f4405abfbffc79c0f666699b9b9e601c91e..8569834d1851d9d4417a82f306e9dfc3874e8a23 100644
|
| --- a/mojo/edk/system/node_controller.h
|
| +++ b/mojo/edk/system/node_controller.h
|
| @@ -275,9 +275,12 @@ class NodeController : public ports::NodeDelegate,
|
| std::unordered_map<ports::NodeName, OutgoingMessageQueue>
|
| pending_relay_messages_;
|
|
|
| - // Guards |incoming_messages_|.
|
| + // Guards |incoming_messages_| and |incoming_messages_task_posted_|.
|
| base::Lock messages_lock_;
|
| std::queue<ports::ScopedMessage> incoming_messages_;
|
| + // Ensures that there is only one incoming messages task posted to the IO
|
| + // thread.
|
| + bool incoming_messages_task_posted_ = false;
|
| // Flag to fast-path checking |incoming_messages_|.
|
| AtomicFlag incoming_messages_flag_;
|
|
|
|
|