| Index: mojo/edk/system/data_pipe_consumer_dispatcher.cc
|
| diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.cc b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
|
| index cf89b3bd538f1e8727de3de63ee8386dd13aaa42..74121dc17922ee4659b27af7732b7e468b154a91 100644
|
| --- a/mojo/edk/system/data_pipe_consumer_dispatcher.cc
|
| +++ b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
|
| @@ -23,16 +23,16 @@ Dispatcher::Type DataPipeConsumerDispatcher::GetType() const {
|
| }
|
|
|
| // static
|
| -scoped_refptr<DataPipeConsumerDispatcher>
|
| -DataPipeConsumerDispatcher::Deserialize(Channel* channel,
|
| - const void* source,
|
| - size_t size) {
|
| +RefPtr<DataPipeConsumerDispatcher> DataPipeConsumerDispatcher::Deserialize(
|
| + Channel* channel,
|
| + const void* source,
|
| + size_t size) {
|
| RefPtr<DataPipe> data_pipe;
|
| if (!DataPipe::ConsumerDeserialize(channel, source, size, &data_pipe))
|
| return nullptr;
|
| DCHECK(data_pipe);
|
|
|
| - scoped_refptr<DataPipeConsumerDispatcher> dispatcher = Create();
|
| + auto dispatcher = DataPipeConsumerDispatcher::Create();
|
| dispatcher->Init(std::move(data_pipe));
|
| return dispatcher;
|
| }
|
| @@ -61,13 +61,13 @@ void DataPipeConsumerDispatcher::CloseImplNoLock() {
|
| data_pipe_ = nullptr;
|
| }
|
|
|
| -scoped_refptr<Dispatcher>
|
| +RefPtr<Dispatcher>
|
| DataPipeConsumerDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
|
| mutex().AssertHeld();
|
|
|
| - scoped_refptr<DataPipeConsumerDispatcher> rv = Create();
|
| - rv->Init(std::move(data_pipe_));
|
| - return scoped_refptr<Dispatcher>(rv.get());
|
| + auto dispatcher = DataPipeConsumerDispatcher::Create();
|
| + dispatcher->Init(std::move(data_pipe_));
|
| + return dispatcher;
|
| }
|
|
|
| MojoResult DataPipeConsumerDispatcher::ReadDataImplNoLock(
|
| @@ -150,7 +150,7 @@ void DataPipeConsumerDispatcher::StartSerializeImplNoLock(
|
| Channel* channel,
|
| size_t* max_size,
|
| size_t* max_platform_handles) {
|
| - DCHECK(HasOneRef()); // Only one ref => no need to take the lock.
|
| + AssertHasOneRef(); // Only one ref => no need to take the lock.
|
| data_pipe_->ConsumerStartSerialize(channel, max_size, max_platform_handles);
|
| }
|
|
|
| @@ -159,7 +159,7 @@ bool DataPipeConsumerDispatcher::EndSerializeAndCloseImplNoLock(
|
| void* destination,
|
| size_t* actual_size,
|
| embedder::PlatformHandleVector* platform_handles) {
|
| - DCHECK(HasOneRef()); // Only one ref => no need to take the lock.
|
| + AssertHasOneRef(); // Only one ref => no need to take the lock.
|
|
|
| bool rv = data_pipe_->ConsumerEndSerialize(channel, destination, actual_size,
|
| platform_handles);
|
|
|