Description[mojo-edk] Prevent closed port from accepting new messages
Previously it was possible for a message to arrive just
before closing a port. In this case OnUserMessage would
grab a ref to the Port object (thus keeping it alive),
ClosePort would close the port (in turn closing any
ports referenced by its message queue), and then it
would be possible for OnUserMessage to continue by
locking the port and enqueueing a (potentially port-
carrying) message onto the queue.
This resolves the issue by making CanAcceptMoreMessages
fail if the port is closed.
Also minor cleanup removing the unused ErasePort method.
TBR=amistry@chromium.org
BUG=
Committed: https://crrev.com/1eb892f358de593644d40d4075cadca59a327f94
Cr-Commit-Position: refs/heads/master@{#393947}
Patch Set 1 #
Dependent Patchsets: Messages
Total messages: 7 (2 generated)
|