| Index: mojo/edk/system/platform_handle_dispatcher.cc
|
| diff --git a/third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.cc b/mojo/edk/system/platform_handle_dispatcher.cc
|
| similarity index 94%
|
| copy from third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.cc
|
| copy to mojo/edk/system/platform_handle_dispatcher.cc
|
| index 681b40686344d6a6ee3433b9210317f84bfa41e6..a6f830512abb1c2eed3c56dcbb7d1fae7260e9c9 100644
|
| --- a/third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.cc
|
| +++ b/mojo/edk/system/platform_handle_dispatcher.cc
|
| @@ -15,14 +15,14 @@ namespace {
|
|
|
| const size_t kInvalidPlatformHandleIndex = static_cast<size_t>(-1);
|
|
|
| -struct SerializedPlatformHandleDispatcher {
|
| +struct MOJO_ALIGNAS(8) SerializedPlatformHandleDispatcher {
|
| size_t platform_handle_index; // (Or |kInvalidPlatformHandleIndex|.)
|
| };
|
|
|
| } // namespace
|
|
|
| embedder::ScopedPlatformHandle PlatformHandleDispatcher::PassPlatformHandle() {
|
| - MutexLocker locker(&mutex());
|
| + base::AutoLock locker(lock());
|
| return platform_handle_.Pass();
|
| }
|
|
|
| @@ -32,7 +32,6 @@ Dispatcher::Type PlatformHandleDispatcher::GetType() const {
|
|
|
| // static
|
| scoped_refptr<PlatformHandleDispatcher> PlatformHandleDispatcher::Deserialize(
|
| - Channel* channel,
|
| const void* source,
|
| size_t size,
|
| embedder::PlatformHandleVector* platform_handles) {
|
| @@ -73,18 +72,17 @@ PlatformHandleDispatcher::~PlatformHandleDispatcher() {
|
| }
|
|
|
| void PlatformHandleDispatcher::CloseImplNoLock() {
|
| - mutex().AssertHeld();
|
| + lock().AssertAcquired();
|
| platform_handle_.reset();
|
| }
|
|
|
| scoped_refptr<Dispatcher>
|
| PlatformHandleDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
|
| - mutex().AssertHeld();
|
| + lock().AssertAcquired();
|
| return Create(platform_handle_.Pass());
|
| }
|
|
|
| void PlatformHandleDispatcher::StartSerializeImplNoLock(
|
| - Channel* /*channel*/,
|
| size_t* max_size,
|
| size_t* max_platform_handles) {
|
| DCHECK(HasOneRef()); // Only one ref => no need to take the lock.
|
| @@ -93,7 +91,6 @@ void PlatformHandleDispatcher::StartSerializeImplNoLock(
|
| }
|
|
|
| bool PlatformHandleDispatcher::EndSerializeAndCloseImplNoLock(
|
| - Channel* /*channel*/,
|
| void* destination,
|
| size_t* actual_size,
|
| embedder::PlatformHandleVector* platform_handles) {
|
|
|