Index: mojo/message_pump/message_pump_mojo.cc |
diff --git a/mojo/message_pump/message_pump_mojo.cc b/mojo/message_pump/message_pump_mojo.cc |
index cd220179b2abc0e3d7b6c254af5f4c21a981c7c6..12f9cc163c444a3f6303a2d380a66daa478c7ac6 100644 |
--- a/mojo/message_pump/message_pump_mojo.cc |
+++ b/mojo/message_pump/message_pump_mojo.cc |
@@ -202,6 +202,7 @@ bool MessagePumpMojo::DoInternalWork(const RunState& run_state, bool block) { |
switch (result) { |
case MOJO_RESULT_CANCELLED: |
case MOJO_RESULT_FAILED_PRECONDITION: |
+ case MOJO_RESULT_INVALID_ARGUMENT: |
RemoveInvalidHandle(wait_state, result, wait_many_result.index); |
break; |
case MOJO_RESULT_DEADLINE_EXCEEDED: |
@@ -249,7 +250,8 @@ void MessagePumpMojo::RemoveInvalidHandle(const WaitState& wait_state, |
MojoResult result, |
uint32_t index) { |
// TODO(sky): deal with control pipe going bad. |
- CHECK(result == MOJO_RESULT_FAILED_PRECONDITION || |
+ CHECK(result == MOJO_RESULT_INVALID_ARGUMENT || |
+ result == MOJO_RESULT_FAILED_PRECONDITION || |
result == MOJO_RESULT_CANCELLED); |
CHECK_NE(index, 0u); // Indicates the control pipe went bad. |