From bd6dc56899588026a824df756f11303150f02cf3 Mon Sep 17 00:00:00 2001 From: rockot Date: Thu, 24 Mar 2016 11:25:13 -0700 Subject: [mojo-edk] Don't assert on PortAccepted for unknown port It's possible for a proxy port to be closed before a PortAccepted message is processed for it. This can happen if a node accepts the new port (the proxy's target) then dies immediately after sending the corresponding PortAccepted message. In this case we should not be asserting. It's safe to fail silently. BUG=592905 TBR=amistry@chromium.org Review URL: https://codereview.chromium.org/1833683002 Cr-Commit-Position: refs/heads/master@{#383100} --- mojo/edk/system/ports/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mojo/edk/system/ports/node.cc b/mojo/edk/system/ports/node.cc index aca9a55..266ee84 100644 --- a/mojo/edk/system/ports/node.cc +++ b/mojo/edk/system/ports/node.cc @@ -553,7 +553,7 @@ int Node::OnUserMessage(ScopedMessage message) { int Node::OnPortAccepted(const PortName& port_name) { scoped_refptr port = GetPort(port_name); if (!port) - return OOPS(ERROR_PORT_UNKNOWN); + return ERROR_PORT_UNKNOWN; { // We must hold |ports_lock_| before grabbing the port lock because -- cgit v1.1