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

Side by Side Diff: xfa/fxfa/parser/xfa_script_imp.h

Issue 2026993003: Remove FXJSE_Value_ToObject and call methods directly (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@context_cleanup_3
Patch Set: Created 4 years, 6 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_script_hostpseudomodel.cpp ('k') | xfa/fxfa/parser/xfa_script_imp.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 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ 7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_
8 #define XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ 8 #define XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 FX_BOOL bQueryIn); 86 FX_BOOL bQueryIn);
87 FX_BOOL RunVariablesScript(CXFA_Node* pScriptNode); 87 FX_BOOL RunVariablesScript(CXFA_Node* pScriptNode);
88 CXFA_Object* GetVariablesThis(CXFA_Object* pObject, 88 CXFA_Object* GetVariablesThis(CXFA_Object* pObject,
89 FX_BOOL bScriptNode = FALSE); 89 FX_BOOL bScriptNode = FALSE);
90 void ReleaseVariablesMap(); 90 void ReleaseVariablesMap();
91 FX_BOOL IsStrictScopeInJavaScript(); 91 FX_BOOL IsStrictScopeInJavaScript();
92 XFA_SCRIPTLANGTYPE GetType(); 92 XFA_SCRIPTLANGTYPE GetType();
93 CXFA_NodeArray& GetUpObjectArray() { return m_upObjectArray; } 93 CXFA_NodeArray& GetUpObjectArray() { return m_upObjectArray; }
94 CXFA_Document* GetDocument() const { return m_pDocument; } 94 CXFA_Document* GetDocument() const { return m_pDocument; }
95 95
96 static CXFA_Object* ToObject(CFXJSE_Value* pValue, CFXJSE_Class* pClass);
97
96 private: 98 private:
97 void DefineJsContext(); 99 void DefineJsContext();
98 CFXJSE_Context* CreateVariablesContext(CXFA_Node* pScriptNode, 100 CFXJSE_Context* CreateVariablesContext(CXFA_Node* pScriptNode,
99 CXFA_Node* pSubform); 101 CXFA_Node* pSubform);
100 void DefineJsClass(); 102 void DefineJsClass();
101 void RemoveBuiltInObjs(CFXJSE_Context* pContext) const; 103 void RemoveBuiltInObjs(CFXJSE_Context* pContext) const;
102 104
103 CXFA_Document* m_pDocument; 105 CXFA_Document* m_pDocument;
104 CFXJSE_Context* m_pJsContext; 106 CFXJSE_Context* m_pJsContext;
105 v8::Isolate* m_pIsolate; 107 v8::Isolate* m_pIsolate;
106 CFXJSE_Class* m_pJsClass; 108 CFXJSE_Class* m_pJsClass;
107 XFA_SCRIPTLANGTYPE m_eScriptType; 109 XFA_SCRIPTLANGTYPE m_eScriptType;
108 CFX_MapPtrTemplate<CXFA_Object*, CFXJSE_Value*> m_mapXFAToValue; 110 CFX_MapPtrTemplate<CXFA_Object*, CFXJSE_Value*> m_mapXFAToValue;
109 CFX_MapPtrTemplate<CXFA_Object*, CFXJSE_Context*> m_mapVariableToContext; 111 CFX_MapPtrTemplate<CXFA_Object*, CFXJSE_Context*> m_mapVariableToContext;
110 CXFA_EventParam m_eventParam; 112 CXFA_EventParam m_eventParam;
111 CXFA_NodeArray m_upObjectArray; 113 CXFA_NodeArray m_upObjectArray;
112 CFX_ArrayTemplate<CXFA_NodeList*> m_CacheListArray; 114 CFX_ArrayTemplate<CXFA_NodeList*> m_CacheListArray;
113 CXFA_NodeArray* m_pScriptNodeArray; 115 CXFA_NodeArray* m_pScriptNodeArray;
114 CXFA_ResolveProcessor* m_pResolveProcessor; 116 CXFA_ResolveProcessor* m_pResolveProcessor;
115 CXFA_FM2JSContext* m_hFM2JSContext; 117 CXFA_FM2JSContext* m_hFM2JSContext;
116 CXFA_Object* m_pThisObject; 118 CXFA_Object* m_pThisObject;
117 uint32_t m_dwBuiltInInFlags; 119 uint32_t m_dwBuiltInInFlags;
118 XFA_ATTRIBUTEENUM m_eRunAtType; 120 XFA_ATTRIBUTEENUM m_eRunAtType;
119 }; 121 };
120 122
121 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ 123 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp ('k') | xfa/fxfa/parser/xfa_script_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698