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

Side by Side Diff: mojo/common/message_pump_mojo.cc

Issue 68523010: Fixes bug where MessagePumpMojo was listening for state on the wrong handle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/common/message_pump_mojo.h" 5 #include "mojo/common/message_pump_mojo.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 if (!run_state_) 177 if (!run_state_)
178 return; 178 return;
179 179
180 // TODO(sky): deal with error? 180 // TODO(sky): deal with error?
181 MojoWriteMessage(run_state_->write_handle(), NULL, 0, NULL, 0, 181 MojoWriteMessage(run_state_->write_handle(), NULL, 0, NULL, 0,
182 MOJO_WRITE_MESSAGE_FLAG_NONE); 182 MOJO_WRITE_MESSAGE_FLAG_NONE);
183 } 183 }
184 184
185 MessagePumpMojo::WaitState MessagePumpMojo::GetWaitState() const { 185 MessagePumpMojo::WaitState MessagePumpMojo::GetWaitState() const {
186 WaitState wait_state; 186 WaitState wait_state;
187 wait_state.handles.push_back(run_state_->write_handle()); 187 wait_state.handles.push_back(run_state_->read_handle());
188 wait_state.wait_flags.push_back(MOJO_WAIT_FLAG_READABLE); 188 wait_state.wait_flags.push_back(MOJO_WAIT_FLAG_READABLE);
189 189
190 for (HandleToHandler::const_iterator i = handlers_.begin(); 190 for (HandleToHandler::const_iterator i = handlers_.begin();
191 i != handlers_.end(); ++i) { 191 i != handlers_.end(); ++i) {
192 wait_state.handles.push_back(i->first); 192 wait_state.handles.push_back(i->first);
193 wait_state.wait_flags.push_back(i->second.wait_flags); 193 wait_state.wait_flags.push_back(i->second.wait_flags);
194 } 194 }
195 return wait_state; 195 return wait_state;
196 } 196 }
197 197
198 } // namespace common 198 } // namespace common
199 } // namespace mojo 199 } // namespace mojo
OLDNEW
« 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