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

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

Issue 1309103002: Revert of Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
Index: third_party/mojo/src/mojo/edk/system/data_pipe_consumer_dispatcher.cc
diff --git a/third_party/mojo/src/mojo/edk/system/data_pipe_consumer_dispatcher.cc b/third_party/mojo/src/mojo/edk/system/data_pipe_consumer_dispatcher.cc
index 5a1bafb450329c82b6245e0676aacd3c8933f20c..ac917d99bb472e65bfa5b249e966a1c7782f6e0d 100644
--- a/third_party/mojo/src/mojo/edk/system/data_pipe_consumer_dispatcher.cc
+++ b/third_party/mojo/src/mojo/edk/system/data_pipe_consumer_dispatcher.cc
@@ -35,11 +35,6 @@
return dispatcher;
}
-DataPipe* DataPipeConsumerDispatcher::GetDataPipeForTest() {
- MutexLocker locker(&mutex());
- return data_pipe_.get();
-}
-
DataPipeConsumerDispatcher::DataPipeConsumerDispatcher() {
}
@@ -49,19 +44,19 @@
}
void DataPipeConsumerDispatcher::CancelAllAwakablesNoLock() {
- mutex().AssertHeld();
+ lock().AssertAcquired();
data_pipe_->ConsumerCancelAllAwakables();
}
void DataPipeConsumerDispatcher::CloseImplNoLock() {
- mutex().AssertHeld();
+ lock().AssertAcquired();
data_pipe_->ConsumerClose();
data_pipe_ = nullptr;
}
scoped_refptr<Dispatcher>
DataPipeConsumerDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
- mutex().AssertHeld();
+ lock().AssertAcquired();
scoped_refptr<DataPipeConsumerDispatcher> rv = Create();
rv->Init(data_pipe_);
@@ -73,7 +68,7 @@
UserPointer<void> elements,
UserPointer<uint32_t> num_bytes,
MojoReadDataFlags flags) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
if ((flags & MOJO_READ_DATA_FLAG_DISCARD)) {
// These flags are mutally exclusive.
@@ -104,7 +99,7 @@
UserPointer<const void*> buffer,
UserPointer<uint32_t> buffer_num_bytes,
MojoReadDataFlags flags) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
// These flags may not be used in two-phase mode.
if ((flags & MOJO_READ_DATA_FLAG_DISCARD) ||
@@ -117,14 +112,14 @@
MojoResult DataPipeConsumerDispatcher::EndReadDataImplNoLock(
uint32_t num_bytes_read) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ConsumerEndReadData(num_bytes_read);
}
HandleSignalsState DataPipeConsumerDispatcher::GetHandleSignalsStateImplNoLock()
const {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ConsumerGetHandleSignalsState();
}
@@ -133,7 +128,7 @@
MojoHandleSignals signals,
uint32_t context,
HandleSignalsState* signals_state) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ConsumerAddAwakable(awakable, signals, context,
signals_state);
}
@@ -141,7 +136,7 @@
void DataPipeConsumerDispatcher::RemoveAwakableImplNoLock(
Awakable* awakable,
HandleSignalsState* signals_state) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
data_pipe_->ConsumerRemoveAwakable(awakable, signals_state);
}
@@ -167,7 +162,7 @@
}
bool DataPipeConsumerDispatcher::IsBusyNoLock() const {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ConsumerIsBusy();
}

Powered by Google App Engine
This is Rietveld 408576698