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

Side by Side Diff: xfa/fxfa/parser/xfa_document_imp.cpp

Issue 1980223002: Revert of Replace Release() { delete this; } in fde_xml_imp.h (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/fxfa/parser/xfa_document.h ('k') | xfa/fxfa/parser/xfa_document_serialize.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 "core/fxcrt/include/fx_ext.h" 7 #include "core/fxcrt/include/fx_ext.h"
8 #include "xfa/fxfa/app/xfa_ffnotify.h" 8 #include "xfa/fxfa/app/xfa_ffnotify.h"
9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" 9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h"
10 #include "xfa/fxfa/parser/xfa_basic_imp.h" 10 #include "xfa/fxfa/parser/xfa_basic_imp.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 m_pScriptSignature = nullptr; 70 m_pScriptSignature = nullptr;
71 } 71 }
72 72
73 void CXFA_Document::SetRoot(CXFA_Node* pNewRoot) { 73 void CXFA_Document::SetRoot(CXFA_Node* pNewRoot) {
74 if (m_pRootNode) { 74 if (m_pRootNode) {
75 AddPurgeNode(m_pRootNode); 75 AddPurgeNode(m_pRootNode);
76 } 76 }
77 m_pRootNode = pNewRoot; 77 m_pRootNode = pNewRoot;
78 RemovePurgeNode(pNewRoot); 78 RemovePurgeNode(pNewRoot);
79 } 79 }
80
81 void CXFA_Document::DestroyParser() {
82 delete m_pParser;
83 m_pParser = nullptr;
84 }
85
86 CXFA_FFNotify* CXFA_Document::GetNotify() const { 80 CXFA_FFNotify* CXFA_Document::GetNotify() const {
87 return m_pParser->GetNotify(); 81 return m_pParser->GetNotify();
88 } 82 }
89 CXFA_Object* CXFA_Document::GetXFAObject(const CFX_WideStringC& wsNodeName) { 83 CXFA_Object* CXFA_Document::GetXFAObject(const CFX_WideStringC& wsNodeName) {
90 return GetXFAObject(FX_HashCode_GetW(wsNodeName, false)); 84 return GetXFAObject(FX_HashCode_GetW(wsNodeName, false));
91 } 85 }
92 CXFA_Object* CXFA_Document::GetXFAObject(uint32_t dwNodeNameHash) { 86 CXFA_Object* CXFA_Document::GetXFAObject(uint32_t dwNodeNameHash) {
93 switch (dwNodeNameHash) { 87 switch (dwNodeNameHash) {
94 case XFA_HASHCODE_Data: { 88 case XFA_HASHCODE_Data: {
95 CXFA_Node* pDatasetsNode = ToNode(GetXFAObject(XFA_HASHCODE_Datasets)); 89 CXFA_Node* pDatasetsNode = ToNode(GetXFAObject(XFA_HASHCODE_Datasets));
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) { 412 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) {
419 continue; 413 continue;
420 } 414 }
421 } 415 }
422 if (!pProtoNode) { 416 if (!pProtoNode) {
423 continue; 417 continue;
424 } 418 }
425 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); 419 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode);
426 } 420 }
427 } 421 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_document.h ('k') | xfa/fxfa/parser/xfa_document_serialize.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698