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

Side by Side Diff: fpdfsdk/fpdfxfa/cpdfxfa_document.cpp

Issue 2398063002: Fixup MSan embeddertests (Closed)
Patch Set: Created 4 years, 2 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 | « fpdfsdk/fpdfformfill.cpp ('k') | testing/embedder_test.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 "fpdfsdk/fpdfxfa/cpdfxfa_document.h" 7 #include "fpdfsdk/fpdfxfa/cpdfxfa_document.h"
8 8
9 #include "core/fpdfapi/parser/cpdf_document.h" 9 #include "core/fpdfapi/parser/cpdf_document.h"
10 #include "fpdfsdk/cpdfsdk_document.h" 10 #include "fpdfsdk/cpdfsdk_document.h"
(...skipping 27 matching lines...) Expand all
38 m_pApp(pProvider), 38 m_pApp(pProvider),
39 m_nLoadStatus(FXFA_LOADSTATUS_PRELOAD), 39 m_nLoadStatus(FXFA_LOADSTATUS_PRELOAD),
40 m_nPageCount(0), 40 m_nPageCount(0),
41 m_DocEnv(this) {} 41 m_DocEnv(this) {}
42 42
43 CPDFXFA_Document::~CPDFXFA_Document() { 43 CPDFXFA_Document::~CPDFXFA_Document() {
44 m_nLoadStatus = FXFA_LOADSTATUS_CLOSING; 44 m_nLoadStatus = FXFA_LOADSTATUS_CLOSING;
45 45
46 if (m_pSDKDoc) { 46 if (m_pSDKDoc) {
47 m_pSDKDoc->ClearAllFocusedAnnots(); 47 m_pSDKDoc->ClearAllFocusedAnnots();
48 // Once we're deleted the SDKDocument will point at a bad underlying
49 // doc so we need to reset it ...
50 m_pSDKDoc->ResetXFADocument();
48 m_pSDKDoc = nullptr; 51 m_pSDKDoc = nullptr;
49 } 52 }
50 53
51 if (m_pXFADoc) { 54 if (m_pXFADoc) {
52 CXFA_FFApp* pApp = m_pApp->GetXFAApp(); 55 CXFA_FFApp* pApp = m_pApp->GetXFAApp();
53 if (pApp) { 56 if (pApp) {
54 CXFA_FFDocHandler* pDocHandler = pApp->GetDocHandler(); 57 CXFA_FFDocHandler* pDocHandler = pApp->GetDocHandler();
55 if (pDocHandler) 58 if (pDocHandler)
56 CloseXFADoc(pDocHandler); 59 CloseXFADoc(pDocHandler);
57 } 60 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 197 }
195 198
196 void CPDFXFA_Document::RemovePage(CPDFXFA_Page* page) { 199 void CPDFXFA_Document::RemovePage(CPDFXFA_Page* page) {
197 m_XFAPageList.SetAt(page->GetPageIndex(), nullptr); 200 m_XFAPageList.SetAt(page->GetPageIndex(), nullptr);
198 } 201 }
199 202
200 void CPDFXFA_Document::ClearChangeMark() { 203 void CPDFXFA_Document::ClearChangeMark() {
201 if (m_pSDKDoc) 204 if (m_pSDKDoc)
202 m_pSDKDoc->ClearChangeMark(); 205 m_pSDKDoc->ClearChangeMark();
203 } 206 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfformfill.cpp ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698