| Index: base/allocator/allocator_shim.cc
|
| diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc
|
| index 7a5cfd6c6eeb1983553e9757a284b5ef96d52765..3abe2ac764d20abf823cf576b53f903949c017f6 100644
|
| --- a/base/allocator/allocator_shim.cc
|
| +++ b/base/allocator/allocator_shim.cc
|
| @@ -173,6 +173,23 @@ ALWAYS_INLINE void* ShimCppNew(size_t size) {
|
| return ptr;
|
| }
|
|
|
| +#if defined(_LIBCPP_COUNTING_ALLOCATOR)
|
| +
|
| +void* ShimTaggedCppNew(size_t size, std::new_tag tag) {
|
| + const allocator::AllocatorDispatch* const chain_head = GetChainHead();
|
| + void* ptr;
|
| + do {
|
| + if (chain_head->tagged_alloc_function) {
|
| + ptr = chain_head->tagged_alloc_function(chain_head, size, tag.value);
|
| + } else {
|
| + ptr = chain_head->alloc_function(chain_head, size, nullptr);
|
| + }
|
| + } while (!ptr && CallNewHandler(size));
|
| + return ptr;
|
| +}
|
| +
|
| +#endif // _LIBCPP_COUNTING_ALLOCATOR
|
| +
|
| ALWAYS_INLINE void ShimCppDelete(void* address) {
|
| void* context = nullptr;
|
| #if defined(OS_MACOSX)
|
|
|