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

Side by Side Diff: xfa/fde/css/fde_cssstylesheet.cpp

Issue 1951573002: Replace IFX_MemoryAllocator::Release() with delete. (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 | « xfa/fde/css/fde_cssstyleselector.cpp ('k') | xfa/fee/fde_txtedtbuf.cpp » ('j') | 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/fde/css/fde_cssstylesheet.h" 7 #include "xfa/fde/css/fde_cssstylesheet.h"
8 8
9 #include "xfa/fde/css/fde_cssdatatable.h" 9 #include "xfa/fde/css/fde_cssdatatable.h"
10 #include "xfa/fde/css/fde_csssyntax.h" 10 #include "xfa/fde/css/fde_csssyntax.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ((CFDE_CSSFontFaceRule*)pRule)->~CFDE_CSSFontFaceRule(); 94 ((CFDE_CSSFontFaceRule*)pRule)->~CFDE_CSSFontFaceRule();
95 break; 95 break;
96 default: 96 default:
97 ASSERT(FALSE); 97 ASSERT(FALSE);
98 break; 98 break;
99 } 99 }
100 } 100 }
101 m_RuleArray.RemoveAll(); 101 m_RuleArray.RemoveAll();
102 m_Selectors.RemoveAll(); 102 m_Selectors.RemoveAll();
103 m_StringCache.RemoveAll(); 103 m_StringCache.RemoveAll();
104 if (m_pAllocator) { 104 delete m_pAllocator;
105 m_pAllocator->Release(); 105 m_pAllocator = nullptr;
106 m_pAllocator = NULL;
107 }
108 } 106 }
109 uint32_t CFDE_CSSStyleSheet::AddRef() { 107 uint32_t CFDE_CSSStyleSheet::AddRef() {
110 return ++m_wRefCount; 108 return ++m_wRefCount;
111 } 109 }
112 uint32_t CFDE_CSSStyleSheet::Release() { 110 uint32_t CFDE_CSSStyleSheet::Release() {
113 uint32_t dwRefCount = --m_wRefCount; 111 uint32_t dwRefCount = --m_wRefCount;
114 if (dwRefCount == 0) { 112 if (dwRefCount == 0) {
115 delete this; 113 delete this;
116 } 114 }
117 return dwRefCount; 115 return dwRefCount;
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 return NULL; 493 return NULL;
496 } 494 }
497 } 495 }
498 if (pPersudoFirst == NULL) { 496 if (pPersudoFirst == NULL) {
499 return pFirst; 497 return pFirst;
500 } else { 498 } else {
501 pPersudoLast->SetNext(pFirst); 499 pPersudoLast->SetNext(pFirst);
502 return pPersudoFirst; 500 return pPersudoFirst;
503 } 501 }
504 } 502 }
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_cssstyleselector.cpp ('k') | xfa/fee/fde_txtedtbuf.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698