diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-16 18:40:15 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-16 18:40:15 +0000 |
commit | f1fae3cd1b9492cf9411dffd3c486b9672d8cc76 (patch) | |
tree | bee5d8b2528e714149d399163519f0fa35ec532b /core | |
parent | 1b6fcaad0722fb586620efc974726dee3fb0f80f (diff) | |
download | pdfium-f1fae3cd1b9492cf9411dffd3c486b9672d8cc76.tar.xz |
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 <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fxcrt/string_data_template.h | 7 |
1 files changed, 3 insertions, 4 deletions
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 { |