Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2274)

Side by Side Diff: xfa/fgas/crt/fgas_memory.cpp

Issue 1951383002: Only set memory tool define if not set. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fgas/crt/fgas_memory.h" 7 #include "xfa/fgas/crt/fgas_memory.h"
8 8
9 #ifndef MEMORY_TOOL_REPLACES_ALLOCATOR
9 #define MEMORY_TOOL_REPLACES_ALLOCATOR // Temporary, for CF testing. 10 #define MEMORY_TOOL_REPLACES_ALLOCATOR // Temporary, for CF testing.
11 #endif
10 12
11 #include <algorithm> 13 #include <algorithm>
12 14
13 #ifdef MEMORY_TOOL_REPLACES_ALLOCATOR 15 #ifdef MEMORY_TOOL_REPLACES_ALLOCATOR
14 16
15 namespace { 17 namespace {
16 18
17 class CFX_DefStore : public IFX_MemoryAllocator, public CFX_Target { 19 class CFX_DefStore : public IFX_MemoryAllocator, public CFX_Target {
18 public: 20 public:
19 CFX_DefStore() {} 21 CFX_DefStore() {}
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 242 }
241 } 243 }
242 size_t CFX_FixedStore::SetDefChunkSize(size_t iChunkSize) { 244 size_t CFX_FixedStore::SetDefChunkSize(size_t iChunkSize) {
243 ASSERT(iChunkSize != 0); 245 ASSERT(iChunkSize != 0);
244 size_t v = m_iDefChunkSize; 246 size_t v = m_iDefChunkSize;
245 m_iDefChunkSize = FX_4BYTEALIGN(iChunkSize); 247 m_iDefChunkSize = FX_4BYTEALIGN(iChunkSize);
246 return v; 248 return v;
247 } 249 }
248 250
249 #endif // MEMORY_TOOL_REPLACES_ALLOCATOR 251 #endif // MEMORY_TOOL_REPLACES_ALLOCATOR
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698