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

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

Issue 1296453004: Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick GL_APIENTRY addition back in 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 88190cfe591926b856e41edc6927f7f99423a504..ddb8b9f90f247d3be5f3e23f099c65174401e515 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,6 +35,11 @@ DataPipeProducerDispatcher::Deserialize(Channel* channel,
return dispatcher;
}
+DataPipe* DataPipeProducerDispatcher::GetDataPipeForTest() {
+ MutexLocker locker(&mutex());
+ return data_pipe_.get();
+}
+
DataPipeProducerDispatcher::DataPipeProducerDispatcher() {
}
@@ -44,19 +49,19 @@ DataPipeProducerDispatcher::~DataPipeProducerDispatcher() {
}
void DataPipeProducerDispatcher::CancelAllAwakablesNoLock() {
- lock().AssertAcquired();
+ mutex().AssertHeld();
data_pipe_->ProducerCancelAllAwakables();
}
void DataPipeProducerDispatcher::CloseImplNoLock() {
- lock().AssertAcquired();
+ mutex().AssertHeld();
data_pipe_->ProducerClose();
data_pipe_ = nullptr;
}
scoped_refptr<Dispatcher>
DataPipeProducerDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
- lock().AssertAcquired();
+ mutex().AssertHeld();
scoped_refptr<DataPipeProducerDispatcher> rv = Create();
rv->Init(data_pipe_);
@@ -68,7 +73,7 @@ MojoResult DataPipeProducerDispatcher::WriteDataImplNoLock(
UserPointer<const void> elements,
UserPointer<uint32_t> num_bytes,
MojoWriteDataFlags flags) {
- lock().AssertAcquired();
+ mutex().AssertHeld();
return data_pipe_->ProducerWriteData(
elements, num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
}
@@ -77,7 +82,7 @@ MojoResult DataPipeProducerDispatcher::BeginWriteDataImplNoLock(
UserPointer<void*> buffer,
UserPointer<uint32_t> buffer_num_bytes,
MojoWriteDataFlags flags) {
- lock().AssertAcquired();
+ mutex().AssertHeld();
return data_pipe_->ProducerBeginWriteData(
buffer, buffer_num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
@@ -85,14 +90,14 @@ MojoResult DataPipeProducerDispatcher::BeginWriteDataImplNoLock(
MojoResult DataPipeProducerDispatcher::EndWriteDataImplNoLock(
uint32_t num_bytes_written) {
- lock().AssertAcquired();
+ mutex().AssertHeld();
return data_pipe_->ProducerEndWriteData(num_bytes_written);
}
HandleSignalsState DataPipeProducerDispatcher::GetHandleSignalsStateImplNoLock()
const {
- lock().AssertAcquired();
+ mutex().AssertHeld();
return data_pipe_->ProducerGetHandleSignalsState();
}
@@ -101,7 +106,7 @@ MojoResult DataPipeProducerDispatcher::AddAwakableImplNoLock(
MojoHandleSignals signals,
uint32_t context,
HandleSignalsState* signals_state) {
- lock().AssertAcquired();
+ mutex().AssertHeld();
return data_pipe_->ProducerAddAwakable(awakable, signals, context,
signals_state);
}
@@ -109,7 +114,7 @@ MojoResult DataPipeProducerDispatcher::AddAwakableImplNoLock(
void DataPipeProducerDispatcher::RemoveAwakableImplNoLock(
Awakable* awakable,
HandleSignalsState* signals_state) {
- lock().AssertAcquired();
+ mutex().AssertHeld();
data_pipe_->ProducerRemoveAwakable(awakable, signals_state);
}
@@ -135,7 +140,7 @@ bool DataPipeProducerDispatcher::EndSerializeAndCloseImplNoLock(
}
bool DataPipeProducerDispatcher::IsBusyNoLock() const {
- lock().AssertAcquired();
+ mutex().AssertHeld();
return data_pipe_->ProducerIsBusy();
}

Powered by Google App Engine
This is Rietveld 408576698