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

Unified Diff: third_party/mojo/src/mojo/edk/system/data_pipe_producer_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_producer_dispatcher.cc
diff --git a/third_party/mojo/src/mojo/edk/system/data_pipe_producer_dispatcher.cc b/third_party/mojo/src/mojo/edk/system/data_pipe_producer_dispatcher.cc
index ddb8b9f90f247d3be5f3e23f099c65174401e515..88190cfe591926b856e41edc6927f7f99423a504 100644
--- a/third_party/mojo/src/mojo/edk/system/data_pipe_producer_dispatcher.cc
+++ b/third_party/mojo/src/mojo/edk/system/data_pipe_producer_dispatcher.cc
@@ -35,11 +35,6 @@
return dispatcher;
}
-DataPipe* DataPipeProducerDispatcher::GetDataPipeForTest() {
- MutexLocker locker(&mutex());
- return data_pipe_.get();
-}
-
DataPipeProducerDispatcher::DataPipeProducerDispatcher() {
}
@@ -49,19 +44,19 @@
}
void DataPipeProducerDispatcher::CancelAllAwakablesNoLock() {
- mutex().AssertHeld();
+ lock().AssertAcquired();
data_pipe_->ProducerCancelAllAwakables();
}
void DataPipeProducerDispatcher::CloseImplNoLock() {
- mutex().AssertHeld();
+ lock().AssertAcquired();
data_pipe_->ProducerClose();
data_pipe_ = nullptr;
}
scoped_refptr<Dispatcher>
DataPipeProducerDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
- mutex().AssertHeld();
+ lock().AssertAcquired();
scoped_refptr<DataPipeProducerDispatcher> rv = Create();
rv->Init(data_pipe_);
@@ -73,7 +68,7 @@
UserPointer<const void> elements,
UserPointer<uint32_t> num_bytes,
MojoWriteDataFlags flags) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ProducerWriteData(
elements, num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
}
@@ -82,7 +77,7 @@
UserPointer<void*> buffer,
UserPointer<uint32_t> buffer_num_bytes,
MojoWriteDataFlags flags) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ProducerBeginWriteData(
buffer, buffer_num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
@@ -90,14 +85,14 @@
MojoResult DataPipeProducerDispatcher::EndWriteDataImplNoLock(
uint32_t num_bytes_written) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ProducerEndWriteData(num_bytes_written);
}
HandleSignalsState DataPipeProducerDispatcher::GetHandleSignalsStateImplNoLock()
const {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ProducerGetHandleSignalsState();
}
@@ -106,7 +101,7 @@
MojoHandleSignals signals,
uint32_t context,
HandleSignalsState* signals_state) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ProducerAddAwakable(awakable, signals, context,
signals_state);
}
@@ -114,7 +109,7 @@
void DataPipeProducerDispatcher::RemoveAwakableImplNoLock(
Awakable* awakable,
HandleSignalsState* signals_state) {
- mutex().AssertHeld();
+ lock().AssertAcquired();
data_pipe_->ProducerRemoveAwakable(awakable, signals_state);
}
@@ -140,7 +135,7 @@
}
bool DataPipeProducerDispatcher::IsBusyNoLock() const {
- mutex().AssertHeld();
+ lock().AssertAcquired();
return data_pipe_->ProducerIsBusy();
}

Powered by Google App Engine
This is Rietveld 408576698