| Index: ipc/mojo/async_handle_waiter.cc
|
| diff --git a/ipc/mojo/async_handle_waiter.cc b/ipc/mojo/async_handle_waiter.cc
|
| index b9e68d7c4539886059b8428617eb43121eb19b4d..64a5251955d265664e6fba8ed346df2d55920a84 100644
|
| --- a/ipc/mojo/async_handle_waiter.cc
|
| +++ b/ipc/mojo/async_handle_waiter.cc
|
| @@ -17,6 +17,7 @@ namespace internal {
|
| class AsyncHandleWaiterContextTraits {
|
| public:
|
| static void Destruct(const AsyncHandleWaiter::Context* context);
|
| + static void Delete(const AsyncHandleWaiter::Context* context);
|
| };
|
|
|
| // The thread-safe part of |AsyncHandleWaiter|.
|
| @@ -51,8 +52,9 @@ class AsyncHandleWaiter::Context
|
| }
|
|
|
| private:
|
| - friend void base::DeletePointer<const Context>(const Context* self);
|
| friend class AsyncHandleWaiterContextTraits;
|
| + friend class base::internal::OwnedWrapper<
|
| + const IPC::internal::AsyncHandleWaiter::Context>;
|
| friend class base::RefCountedThreadSafe<Context>;
|
|
|
| ~Context() override {
|
| @@ -157,8 +159,14 @@ void AsyncHandleWaiterContextTraits::Destruct(
|
| const AsyncHandleWaiter::Context* context) {
|
| context->io_runner_->PostTask(
|
| FROM_HERE,
|
| - base::Bind(&base::DeletePointer<const AsyncHandleWaiter::Context>,
|
| - base::Unretained(context)));
|
| + base::Bind(&AsyncHandleWaiterContextTraits::Delete,
|
| + base::Owned(context)));
|
| +}
|
| +
|
| +// static
|
| +void AsyncHandleWaiterContextTraits::Delete(
|
| + const AsyncHandleWaiter::Context* context) {
|
| + // base::Owned() is going to do it for us.
|
| }
|
|
|
| } // namespace internal
|
|
|