| Index: mojo/edk/system/ports/node.cc
|
| diff --git a/mojo/edk/system/ports/node.cc b/mojo/edk/system/ports/node.cc
|
| index 93bb7c38b727ce0a6fd56d967b561b3409f052d8..186e8aaad95795f6f608555a0d7c16d17a73db40 100644
|
| --- a/mojo/edk/system/ports/node.cc
|
| +++ b/mojo/edk/system/ports/node.cc
|
| @@ -263,16 +263,12 @@ int Node::GetStatus(const PortRef& port_ref, PortStatus* port_status) {
|
| return OK;
|
| }
|
|
|
| -int Node::GetMessage(const PortRef& port_ref, ScopedMessage* message) {
|
| - return GetMessageIf(port_ref, nullptr, message);
|
| -}
|
| -
|
| -int Node::GetMessageIf(const PortRef& port_ref,
|
| - std::function<bool(const Message&)> selector,
|
| - ScopedMessage* message) {
|
| +int Node::GetMessage(const PortRef& port_ref,
|
| + ScopedMessage* message,
|
| + MessageFilter* filter) {
|
| *message = nullptr;
|
|
|
| - DVLOG(4) << "GetMessageIf for " << port_ref.name() << "@" << name_;
|
| + DVLOG(4) << "GetMessage for " << port_ref.name() << "@" << name_;
|
|
|
| Port* port = port_ref.port();
|
| {
|
| @@ -288,7 +284,7 @@ int Node::GetMessageIf(const PortRef& port_ref,
|
| if (!CanAcceptMoreMessages(port))
|
| return ERROR_PORT_PEER_CLOSED;
|
|
|
| - port->message_queue.GetNextMessageIf(std::move(selector), message);
|
| + port->message_queue.GetNextMessage(message, filter);
|
| }
|
|
|
| // Allow referenced ports to trigger PortStatusChanged calls.
|
| @@ -994,7 +990,7 @@ int Node::AcceptPort(const PortName& port_name,
|
| << port->last_sequence_num_to_receive << "]";
|
|
|
| // A newly accepted port is not signalable until the message referencing the
|
| - // new port finds its way to the consumer (see GetMessageIf).
|
| + // new port finds its way to the consumer (see GetMessage).
|
| port->message_queue.set_signalable(false);
|
|
|
| int rv = AddPortWithName(port_name, port);
|
| @@ -1176,7 +1172,7 @@ int Node::ForwardMessages_Locked(const LockedPort& port,
|
|
|
| for (;;) {
|
| ScopedMessage message;
|
| - port->message_queue.GetNextMessageIf(nullptr, &message);
|
| + port->message_queue.GetNextMessage(&message, nullptr);
|
| if (!message)
|
| break;
|
|
|
|
|