| 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 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_H_ |
| 8 #define XFA_FXFA_PARSER_XFA_SCRIPT_H_ | 8 #define XFA_FXFA_PARSER_XFA_SCRIPT_H_ |
| 9 | 9 |
| 10 #include "xfa/fxfa/include/fxfa.h" | 10 #include "xfa/fxfa/include/fxfa.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 public: | 40 public: |
| 41 CXFA_ValueArray(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {} | 41 CXFA_ValueArray(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {} |
| 42 | 42 |
| 43 ~CXFA_ValueArray() { | 43 ~CXFA_ValueArray() { |
| 44 for (int32_t i = 0; i < GetSize(); i++) { | 44 for (int32_t i = 0; i < GetSize(); i++) { |
| 45 delete GetAt(i); | 45 delete GetAt(i); |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 | 48 |
| 49 void GetAttributeObject(CXFA_ObjArray& objArray) { | 49 void GetAttributeObject(CXFA_ObjArray& objArray) { |
| 50 for (int32_t i = 0; i < GetSize(); i++) { | 50 for (int32_t i = 0; i < GetSize(); i++) |
| 51 objArray.Add( | 51 objArray.Add(GetAt(i)->ToObject(nullptr)); |
| 52 static_cast<CXFA_Object*>(FXJSE_Value_ToObject(GetAt(i), nullptr))); | |
| 53 } | |
| 54 } | 52 } |
| 55 | 53 |
| 56 v8::Isolate* m_pIsolate; | 54 v8::Isolate* m_pIsolate; |
| 57 }; | 55 }; |
| 58 | 56 |
| 59 struct XFA_RESOLVENODE_RS { | 57 struct XFA_RESOLVENODE_RS { |
| 60 XFA_RESOLVENODE_RS() | 58 XFA_RESOLVENODE_RS() |
| 61 : dwFlags(XFA_RESOVENODE_RSTYPE_Nodes), pScriptAttribute(NULL) {} | 59 : dwFlags(XFA_RESOVENODE_RSTYPE_Nodes), pScriptAttribute(NULL) {} |
| 62 | 60 |
| 63 ~XFA_RESOLVENODE_RS() { nodes.RemoveAll(); } | 61 ~XFA_RESOLVENODE_RS() { nodes.RemoveAll(); } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 74 } | 72 } |
| 75 return valueArray.GetSize(); | 73 return valueArray.GetSize(); |
| 76 } | 74 } |
| 77 | 75 |
| 78 CXFA_ObjArray nodes; | 76 CXFA_ObjArray nodes; |
| 79 XFA_RESOVENODE_RSTYPE dwFlags; | 77 XFA_RESOVENODE_RSTYPE dwFlags; |
| 80 const XFA_SCRIPTATTRIBUTEINFO* pScriptAttribute; | 78 const XFA_SCRIPTATTRIBUTEINFO* pScriptAttribute; |
| 81 }; | 79 }; |
| 82 | 80 |
| 83 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_H_ | 81 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_H_ |
| OLD | NEW |