From f1fae3cd1b9492cf9411dffd3c486b9672d8cc76 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 16 Oct 2018 18:40:15 +0000 Subject: Update PartitionAlloc from Chromium at r599712. BUG=pdfium:1170 Change-Id: I0f8dfb3d517beaa682a9ca7ad4831c5a7a10dc3b Reviewed-on: https://pdfium-review.googlesource.com/c/44073 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- core/fxcrt/string_data_template.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/fxcrt/string_data_template.h b/core/fxcrt/string_data_template.h index f65d37c3ef..0fe679d243 100644 --- a/core/fxcrt/string_data_template.h +++ b/core/fxcrt/string_data_template.h @@ -36,8 +36,8 @@ class StringDataTemplate { size_t usableLen = (totalSize - overhead) / sizeof(CharType); ASSERT(usableLen >= nLen); - void* pData = pdfium::base::PartitionAllocGeneric( - gStringPartitionAllocator.root(), totalSize, "StringDataTemplate"); + void* pData = gStringPartitionAllocator.root()->Alloc(totalSize, + "StringDataTemplate"); return new (pData) StringDataTemplate(nLen, usableLen); } @@ -50,8 +50,7 @@ class StringDataTemplate { void Retain() { ++m_nRefs; } void Release() { if (--m_nRefs <= 0) - pdfium::base::PartitionFreeGeneric(gStringPartitionAllocator.root(), - this); + gStringPartitionAllocator.root()->Free(this); } bool CanOperateInPlace(size_t nTotalLen) const { -- cgit v1.2.3