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

Side by Side Diff: xfa/fxfa/app/xfa_ffdocview.cpp

Issue 1925363002: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase 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/fxbarcode/qrcode/BC_QRCodeReader.cpp ('k') | xfa/fxfa/app/xfa_ffpushbutton.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/fxfa/include/xfa_ffdocview.h" 7 #include "xfa/fxfa/include/xfa_ffdocview.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fxfa/app/xfa_ffbarcode.h" 10 #include "xfa/fxfa/app/xfa_ffbarcode.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 m_pListFocusWidget(nullptr), 55 m_pListFocusWidget(nullptr),
56 m_bInLayoutStatus(FALSE), 56 m_bInLayoutStatus(FALSE),
57 m_pDoc(pDoc), 57 m_pDoc(pDoc),
58 m_pWidgetHandler(nullptr), 58 m_pWidgetHandler(nullptr),
59 m_pXFADocLayout(nullptr), 59 m_pXFADocLayout(nullptr),
60 m_pFocusAcc(nullptr), 60 m_pFocusAcc(nullptr),
61 m_pFocusWidget(nullptr), 61 m_pFocusWidget(nullptr),
62 m_pOldFocusWidget(nullptr), 62 m_pOldFocusWidget(nullptr),
63 m_iStatus(XFA_DOCVIEW_LAYOUTSTATUS_None), 63 m_iStatus(XFA_DOCVIEW_LAYOUTSTATUS_None),
64 m_iLock(0) {} 64 m_iLock(0) {}
65
65 CXFA_FFDocView::~CXFA_FFDocView() { 66 CXFA_FFDocView::~CXFA_FFDocView() {
66 DestroyDocView(); 67 DestroyDocView();
67 if (m_pWidgetHandler) { 68 delete m_pWidgetHandler;
68 delete m_pWidgetHandler;
69 }
70 m_pWidgetHandler = NULL;
71 } 69 }
70
72 void CXFA_FFDocView::InitLayout(CXFA_Node* pNode) { 71 void CXFA_FFDocView::InitLayout(CXFA_Node* pNode) {
73 RunBindItems(); 72 RunBindItems();
74 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Initialize); 73 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Initialize);
75 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_IndexChange); 74 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_IndexChange);
76 } 75 }
77 int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage) { 76 int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage) {
78 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start; 77 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start;
79 m_pDoc->GetXFADoc()->DoProtoMerge(); 78 m_pDoc->GetXFADoc()->DoProtoMerge();
80 m_pDoc->GetXFADoc()->DoDataMerge(); 79 m_pDoc->GetXFADoc()->DoDataMerge();
81 m_pXFADocLayout = GetXFALayout(); 80 m_pXFADocLayout = GetXFALayout();
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { 899 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() {
901 return NULL; 900 return NULL;
902 } 901 }
903 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { 902 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) {
904 return FALSE; 903 return FALSE;
905 } 904 }
906 void CXFA_WidgetAccIterator::SkipTree() { 905 void CXFA_WidgetAccIterator::SkipTree() {
907 m_ContentIterator.SkipChildrenAndMoveToNext(); 906 m_ContentIterator.SkipChildrenAndMoveToNext();
908 m_pCurWidgetAcc = NULL; 907 m_pCurWidgetAcc = NULL;
909 } 908 }
OLDNEW
« no previous file with comments | « xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp ('k') | xfa/fxfa/app/xfa_ffpushbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698