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

Unified Diff: media/mojo/services/mojo_audio_decoder_service.cc

Issue 1982883003: Handle unexpected MojoWait() result in MojoAudioDecoderService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_audio_decoder_service.cc
diff --git a/media/mojo/services/mojo_audio_decoder_service.cc b/media/mojo/services/mojo_audio_decoder_service.cc
index 91d0b9bf8b479dff3c424076f24f208fd43ff4a1..73f623d2961fb76b877be079f2dfd4a42075042e 100644
--- a/media/mojo/services/mojo_audio_decoder_service.cc
+++ b/media/mojo/services/mojo_audio_decoder_service.cc
@@ -153,11 +153,12 @@ scoped_refptr<DecoderBuffer> MojoAudioDecoderService::ReadDecoderBuffer(
// Wait for the data to become available in the DataPipe.
MojoHandleSignalsState state;
- CHECK_EQ(MOJO_RESULT_OK,
- MojoWait(consumer_handle_.get().value(), MOJO_HANDLE_SIGNAL_READABLE,
- MOJO_DEADLINE_INDEFINITE, &state));
+ MojoResult wait_result =
+ MojoWait(consumer_handle_.get().value(), MOJO_HANDLE_SIGNAL_READABLE,
+ MOJO_DEADLINE_INDEFINITE, &state);
- if (state.satisfied_signals & MOJO_HANDLE_SIGNAL_PEER_CLOSED) {
+ if (wait_result != MOJO_RESULT_OK ||
+ state.satisfied_signals & MOJO_HANDLE_SIGNAL_PEER_CLOSED) {
Ken Rockot(use gerrit already) 2016/05/17 23:54:53 It's possible for PEER_CLOSED to be set while READ
Tima Vaisburd 2016/05/18 01:17:16 Done.
DVLOG(1) << __FUNCTION__ << ": Peer closed the data pipe";
return scoped_refptr<DecoderBuffer>();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698