| Index: third_party/WebKit/Source/wtf/PartitionAlloc.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/PartitionAlloc.cpp b/third_party/WebKit/Source/wtf/PartitionAlloc.cpp
|
| index d076568fcfc59bd6984d319884c0c6c19b18d6af..322fe8872bebb8e79c5c2a67ae873c0a553eb3cf 100644
|
| --- a/third_party/WebKit/Source/wtf/PartitionAlloc.cpp
|
| +++ b/third_party/WebKit/Source/wtf/PartitionAlloc.cpp
|
| @@ -60,6 +60,8 @@ bool PartitionRootBase::gInitialized = false;
|
| PartitionPage PartitionRootBase::gSeedPage;
|
| PartitionBucket PartitionRootBase::gPagedBucket;
|
| void (*PartitionRootBase::gOomHandlingFunction)() = nullptr;
|
| +PartitionAllocHooks::AllocationHook* PartitionAllocHooks::m_allocationHook = nullptr;
|
| +PartitionAllocHooks::FreeHook* PartitionAllocHooks::m_freeHook = nullptr;
|
|
|
| static uint16_t partitionBucketNumSystemPages(size_t size)
|
| {
|
| @@ -1060,8 +1062,10 @@ void* partitionReallocGeneric(PartitionRootGeneric* root, void* ptr, size_t newS
|
| // We may be able to perform the realloc in place by changing the
|
| // accessibility of memory pages and, if reducing the size, decommitting
|
| // them.
|
| - if (partitionReallocDirectMappedInPlace(root, page, newSize))
|
| + if (partitionReallocDirectMappedInPlace(root, page, newSize)) {
|
| + PartitionAllocHooks::reallocHookIfEnabled(ptr, ptr, newSize);
|
| return ptr;
|
| + }
|
| }
|
|
|
| size_t actualNewSize = partitionAllocActualSize(root, newSize);
|
|
|