summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_nacl.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-06 21:47:57 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-06 21:47:57 +0000
commitdbbe276bb83d1ee19e652c877e84ce87a7171393 (patch)
treec23f8053d2838e548c301a19e6519d3fb9d428ff /ipc/ipc_channel_nacl.cc
parent51cd5a6af51f9c97711f3fce06a3fee70aacfcae (diff)
downloadchromium_src-dbbe276bb83d1ee19e652c877e84ce87a7171393.zip
chromium_src-dbbe276bb83d1ee19e652c877e84ce87a7171393.tar.gz
chromium_src-dbbe276bb83d1ee19e652c877e84ce87a7171393.tar.bz2
PPAPI/NaCl: Make ipc_channel_nacl process incoming messages.
On NaCl, we don't have libevent to tell us when there are bytes to be read. Instead, we use a reader thread that does a blocking read and posts data back to DidRecvMsg on the channel's main thread. Since this is how we know there's data to read, we must call ProcessIncomingMessages(). R=bbudge BUG=116317 TEST= Review URL: https://chromiumcodereview.appspot.com/10537031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_nacl.cc')
-rw-r--r--ipc/ipc_channel_nacl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ipc/ipc_channel_nacl.cc b/ipc/ipc_channel_nacl.cc
index 88c695f..0a4c0a3 100644
--- a/ipc/ipc_channel_nacl.cc
+++ b/ipc/ipc_channel_nacl.cc
@@ -194,6 +194,12 @@ void Channel::ChannelImpl::DidRecvMsg(scoped_ptr<std::vector<char> > buffer) {
return;
read_queue_.push_back(linked_ptr<std::vector<char> >(buffer.release()));
+
+ // In POSIX, we would be told when there are bytes to read by implementing
+ // OnFileCanReadWithoutBlocking in MessageLoopForIO::Watcher. In NaCl, we
+ // instead know at this point because the reader thread posted some data to
+ // us.
+ ProcessIncomingMessages();
}
void Channel::ChannelImpl::ReadDidFail() {