Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: mojo/edk/system/ports/node.cc

Issue 1712773002: Mojo: Don't allow closed pipe handles to be sent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/message_pipe_dispatcher.cc ('k') | mojo/edk/system/remote_message_pipe_bootstrap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/ports/node.cc
diff --git a/mojo/edk/system/ports/node.cc b/mojo/edk/system/ports/node.cc
index 2ac4a204d0b2c9d1a64d0e24fa44b8974c30121b..a9b8dd04a7382cd4d0cd27768c3cfaaf9e6d841f 100644
--- a/mojo/edk/system/ports/node.cc
+++ b/mojo/edk/system/ports/node.cc
@@ -955,8 +955,9 @@ int Node::WillSendMessage_Locked(Port* port,
{
for (size_t i = 0; i < message->num_ports(); ++i) {
ports[i] = GetPort_Locked(message->ports()[i]);
- ports[i]->lock.Acquire();
+ CHECK(ports[i]);
+ ports[i]->lock.Acquire();
int error = OK;
if (ports[i]->state != Port::kReceiving)
error = ERROR_PORT_STATE_UNEXPECTED;
« no previous file with comments | « mojo/edk/system/message_pipe_dispatcher.cc ('k') | mojo/edk/system/remote_message_pipe_bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698