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

Unified Diff: mojo/edk/system/data_pipe_consumer_dispatcher.cc

Issue 1403033003: Last set of fixes to make the src/mojo/edk pass the page cycler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another small fix Created 5 years, 2 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 | « no previous file | mojo/edk/system/data_pipe_producer_dispatcher.cc » ('j') | mojo/edk/system/raw_channel.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/data_pipe_consumer_dispatcher.cc
diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.cc b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
index 6e0c35b9339a62962c576d9ace6cc330d7f26b3d..49d7a3a7a05a423365f2e689bfa9f0088e8fa994 100644
--- a/mojo/edk/system/data_pipe_consumer_dispatcher.cc
+++ b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
@@ -31,6 +31,12 @@ void DataPipeConsumerDispatcher::Init(
serialized_read_buffer, serialized_read_buffer_size, nullptr, 0u);
internal::g_io_thread_task_runner->PostTask(
FROM_HERE, base::Bind(&DataPipeConsumerDispatcher::InitOnIO, this));
+ } else {
+ // The data pipe consumer could have read all the data and the producer
+ // closed its end subsequently (before the consumer was sent). In that case
+ // when we deserialize the consumer we must make sure to set error_ or
+ // otherwise the peer-closed signal will never be satisfied.
+ error_ = true;
}
}
@@ -92,16 +98,8 @@ DataPipeConsumerDispatcher::Deserialize(
}
}
- if (platform_handle.is_valid()) {
- rv->Init(platform_handle.Pass(), serialized_read_buffer,
- serialized_read_buffer_size);
- } else {
- // The data pipe consumer could have read all the data and the producer
- // closed its end subsequently (before the consumer was sent). In that case
- // when we deserialize the consumer we must make sure to set error_ or
- // otherwise the peer-closed signal will never be satisfied.
- rv->error_ = true;
- }
+ rv->Init(platform_handle.Pass(), serialized_read_buffer,
+ serialized_read_buffer_size);
return rv;
}
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe_producer_dispatcher.cc » ('j') | mojo/edk/system/raw_channel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698