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

Unified Diff: xfa/fxfa/parser/xfa_script.h

Issue 2012253002: Remove FXJSE_HOBJECT and FXJSE_HVALUE for CFXJSE_Value* (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@fxjse_hclass
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_object_imp.cpp ('k') | xfa/fxfa/parser/xfa_script_datawindow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_script.h
diff --git a/xfa/fxfa/parser/xfa_script.h b/xfa/fxfa/parser/xfa_script.h
index 04cc5b9a69b488df68ddfcbbcb4de21b9cdd6cbb..42d3ddfa479b639381c1b6995a2cc0a3bb536bb8 100644
--- a/xfa/fxfa/parser/xfa_script.h
+++ b/xfa/fxfa/parser/xfa_script.h
@@ -35,38 +35,43 @@ enum XFA_RESOVENODE_RSTYPE {
XFA_RESOVENODE_RSTYPE_ExistNodes,
};
-class CXFA_HVALUEArray : public CFX_ArrayTemplate<FXJSE_HVALUE> {
+class CXFA_ValueArray : public CFX_ArrayTemplate<CFXJSE_Value*> {
public:
- CXFA_HVALUEArray(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
- ~CXFA_HVALUEArray() {
+ CXFA_ValueArray(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
+
+ ~CXFA_ValueArray() {
for (int32_t i = 0; i < GetSize(); i++) {
FXJSE_Value_Release(GetAt(i));
}
}
+
void GetAttributeObject(CXFA_ObjArray& objArray) {
for (int32_t i = 0; i < GetSize(); i++) {
CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(GetAt(i), NULL);
objArray.Add(pObject);
}
}
+
v8::Isolate* m_pIsolate;
};
struct XFA_RESOLVENODE_RS {
XFA_RESOLVENODE_RS()
: dwFlags(XFA_RESOVENODE_RSTYPE_Nodes), pScriptAttribute(NULL) {}
+
~XFA_RESOLVENODE_RS() { nodes.RemoveAll(); }
- int32_t GetAttributeResult(CXFA_HVALUEArray& hValueArray) const {
+
+ int32_t GetAttributeResult(CXFA_ValueArray& valueArray) const {
if (pScriptAttribute && pScriptAttribute->eValueType == XFA_SCRIPT_Object) {
- v8::Isolate* pIsolate = hValueArray.m_pIsolate;
+ v8::Isolate* pIsolate = valueArray.m_pIsolate;
for (int32_t i = 0; i < nodes.GetSize(); i++) {
- FXJSE_HVALUE hValue = FXJSE_Value_Create(pIsolate);
+ CFXJSE_Value* pValue = FXJSE_Value_Create(pIsolate);
(nodes[i]->*(pScriptAttribute->lpfnCallback))(
- hValue, FALSE, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);
- hValueArray.Add(hValue);
+ pValue, FALSE, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);
+ valueArray.Add(pValue);
}
}
- return hValueArray.GetSize();
+ return valueArray.GetSize();
}
CXFA_ObjArray nodes;
« no previous file with comments | « xfa/fxfa/parser/xfa_object_imp.cpp ('k') | xfa/fxfa/parser/xfa_script_datawindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698