OLD | NEW |
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/parser/xfa_script_imp.h" | 7 #include "xfa/fxfa/parser/xfa_script_imp.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_ffnotify.h" | 10 #include "xfa/fxfa/app/xfa_ffnotify.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 m_pJsContext(nullptr), | 26 m_pJsContext(nullptr), |
27 m_pIsolate(nullptr), | 27 m_pIsolate(nullptr), |
28 m_pJsClass(nullptr), | 28 m_pJsClass(nullptr), |
29 m_eScriptType(XFA_SCRIPTLANGTYPE_Unkown), | 29 m_eScriptType(XFA_SCRIPTLANGTYPE_Unkown), |
30 m_pScriptNodeArray(nullptr), | 30 m_pScriptNodeArray(nullptr), |
31 m_pResolveProcessor(nullptr), | 31 m_pResolveProcessor(nullptr), |
32 m_hFM2JSContext(nullptr), | 32 m_hFM2JSContext(nullptr), |
33 m_pThisObject(nullptr), | 33 m_pThisObject(nullptr), |
34 m_dwBuiltInInFlags(0), | 34 m_dwBuiltInInFlags(0), |
35 m_eRunAtType(XFA_ATTRIBUTEENUM_Client) { | 35 m_eRunAtType(XFA_ATTRIBUTEENUM_Client) { |
36 FXSYS_memset(&m_JsGlobalClass, 0, sizeof(FXJSE_CLASS)); | 36 FXSYS_memset(&m_JsGlobalClass, 0, sizeof(FXJSE_CLASS_DESCRIPTOR)); |
37 FXSYS_memset(&m_JsNormalClass, 0, sizeof(FXJSE_CLASS)); | 37 FXSYS_memset(&m_JsNormalClass, 0, sizeof(FXJSE_CLASS_DESCRIPTOR)); |
38 } | 38 } |
39 CXFA_ScriptContext::~CXFA_ScriptContext() { | 39 CXFA_ScriptContext::~CXFA_ScriptContext() { |
40 FX_POSITION ps = m_mapXFAToValue.GetStartPosition(); | 40 FX_POSITION ps = m_mapXFAToValue.GetStartPosition(); |
41 while (ps) { | 41 while (ps) { |
42 CXFA_Object* pXFAObj; | 42 CXFA_Object* pXFAObj; |
43 CFXJSE_Value* pValue; | 43 CFXJSE_Value* pValue; |
44 m_mapXFAToValue.GetNextAssoc(ps, pXFAObj, pValue); | 44 m_mapXFAToValue.GetNextAssoc(ps, pXFAObj, pValue); |
45 FXJSE_Value_Release(pValue); | 45 FXJSE_Value_Release(pValue); |
46 } | 46 } |
47 m_mapXFAToValue.RemoveAll(); | 47 m_mapXFAToValue.RemoveAll(); |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 } | 759 } |
760 } | 760 } |
761 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) { | 761 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) { |
762 if (!m_pScriptNodeArray) { | 762 if (!m_pScriptNodeArray) { |
763 return; | 763 return; |
764 } | 764 } |
765 if (m_pScriptNodeArray->Find(pNode) == -1) { | 765 if (m_pScriptNodeArray->Find(pNode) == -1) { |
766 m_pScriptNodeArray->Add(pNode); | 766 m_pScriptNodeArray->Add(pNode); |
767 } | 767 } |
768 } | 768 } |
OLD | NEW |