| Index: base/memory/discardable_shared_memory.cc
|
| diff --git a/base/memory/discardable_shared_memory.cc b/base/memory/discardable_shared_memory.cc
|
| index 99d2991308a3cd503543f5c6da2cbcc6ef1765e1..89d67af827e4adf82aa1d5089e79982dd369d8fc 100644
|
| --- a/base/memory/discardable_shared_memory.cc
|
| +++ b/base/memory/discardable_shared_memory.cc
|
| @@ -224,9 +224,10 @@ DiscardableSharedMemory::LockResult DiscardableSharedMemory::Lock(
|
| // Pin pages if supported.
|
| #if defined(OS_ANDROID)
|
| SharedMemoryHandle handle = shared_memory_.handle();
|
| - if (SharedMemory::IsHandleValid(handle)) {
|
| - if (ashmem_pin_region(
|
| - handle.fd, AlignToPageSize(sizeof(SharedState)) + offset, length)) {
|
| + if (handle.IsValid()) {
|
| + if (ashmem_pin_region(handle.GetHandle(),
|
| + AlignToPageSize(sizeof(SharedState)) + offset,
|
| + length)) {
|
| return PURGED;
|
| }
|
| }
|
| @@ -251,9 +252,10 @@ void DiscardableSharedMemory::Unlock(size_t offset, size_t length) {
|
| // Unpin pages if supported.
|
| #if defined(OS_ANDROID)
|
| SharedMemoryHandle handle = shared_memory_.handle();
|
| - if (SharedMemory::IsHandleValid(handle)) {
|
| - if (ashmem_unpin_region(
|
| - handle.fd, AlignToPageSize(sizeof(SharedState)) + offset, length)) {
|
| + if (handle.IsValid()) {
|
| + if (ashmem_unpin_region(handle.GetHandle(),
|
| + AlignToPageSize(sizeof(SharedState)) + offset,
|
| + length)) {
|
| DPLOG(ERROR) << "ashmem_unpin_region() failed";
|
| }
|
| }
|
|
|