Commit 59b5b97b authored by Bartek Nowierski's avatar Bartek Nowierski Committed by Commit Bot

Improve naming: EnableForPtr->EnabledForPtr

Bug: 1073933
Change-Id: Ib3b0749032a3d34baea5eca8f4a4724552242c4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2257123
Auto-Submit: Bartek Nowierski <bartekn@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781260}
parent 4c58f1f0
......@@ -11,7 +11,8 @@ namespace internal {
#if defined(ARCH_CPU_64_BITS) && !defined(OS_NACL)
BASE_EXPORT bool CheckedPtr2ImplPartitionAllocSupport::EnableForPtr(void* ptr) {
BASE_EXPORT bool CheckedPtr2ImplPartitionAllocSupport::EnabledForPtr(
void* ptr) {
// CheckedPtr2Impl works only when memory is allocated by PartitionAlloc and
// only only if the pointer points to the beginning of the allocated slot.
//
......
......@@ -99,8 +99,9 @@ static_assert((kTopBit & kGenerationMask) > 0,
// overridden by tests. The implementation is in the .cc file, because including
// partition_alloc.h here could lead to cyclic includes.
struct CheckedPtr2ImplPartitionAllocSupport {
// Checks if CheckedPtr2 support is enabled in PartitionAlloc for |ptr|.
// TODO(bartekn): Check if this function gets inlined.
BASE_EXPORT static bool EnableForPtr(void* ptr);
BASE_EXPORT static bool EnabledForPtr(void* ptr);
};
template <typename PartitionAllocSupport = CheckedPtr2ImplPartitionAllocSupport>
......@@ -125,7 +126,7 @@ struct CheckedPtr2Impl {
// Return a not-wrapped |addr|, if it's either nullptr or if the protection
// for this pointer is disabled.
if (!PartitionAllocSupport::EnableForPtr(ptr)) {
if (!PartitionAllocSupport::EnabledForPtr(ptr)) {
return addr;
}
......
......@@ -613,7 +613,7 @@ namespace {
struct CheckedPtr2ImplPartitionAllocSupportEnabled
: base::internal::CheckedPtr2ImplPartitionAllocSupport {
static bool EnableForPtr(void* ptr) { return true; }
static bool EnabledForPtr(void* ptr) { return true; }
};
using CheckedPtr2ImplEnabled = base::internal::CheckedPtr2Impl<
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment