diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-14 12:13:22 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 19:59:49 +0000 |
commit | f8a943908a414836271a1b7d7e4a97635d941b7f (patch) | |
tree | 7f900d57e21c72a67a0347e4f25d0784bdad7c83 /xfa/fxfa/fm2js/xfa_fm2jscontext.cpp | |
parent | 05df075154a832fcb476e1dfcfb865722d0ea898 (diff) | |
download | pdfium-f8a943908a414836271a1b7d7e4a97635d941b7f.tar.xz |
Replace CXFA_{Object,Node}Array with std::vector
These two ought to happen at the same time as they are
intertwined in spots. Remove blatant casts between the
two along the way.
Change-Id: I9ce5d2faadf1e38aba7cade316560d24a66d8669
Reviewed-on: https://pdfium-review.googlesource.com/2933
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_fm2jscontext.cpp')
-rw-r--r-- | xfa/fxfa/fm2js/xfa_fm2jscontext.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp index 2ee687d326..21d91395c2 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp @@ -1558,7 +1558,6 @@ void CXFA_FM2JSContext::Time2Num(CFXJSE_Value* pThis, if (localString.IsEmpty()) { CXFA_Node* pThisNode = ToNode(pDoc->GetScriptContext()->GetThisObject()); ASSERT(pThisNode); - CXFA_WidgetData widgetData(pThisNode); pLocale = widgetData.GetLocal(); } else { @@ -6092,7 +6091,7 @@ bool CXFA_FM2JSContext::GetObjectForName( dwFlags); if (iRet >= 1 && resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) { accessorValue->Assign( - pScriptContext->GetJSValueFromMap(resoveNodeRS.nodes.GetAt(0))); + pScriptContext->GetJSValueFromMap(resoveNodeRS.objects.front())); return true; } return false; @@ -6160,11 +6159,11 @@ void CXFA_FM2JSContext::ParseResolveResult( if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) { *bAttribute = false; - for (int32_t i = 0; i < resoveNodeRS.nodes.GetSize(); i++) { + CXFA_ScriptContext* pScriptContext = + pContext->GetDocument()->GetScriptContext(); + for (CXFA_Object* pObject : resoveNodeRS.objects) { resultValues->push_back(pdfium::MakeUnique<CFXJSE_Value>(pIsolate)); - resultValues->back()->Assign( - pContext->GetDocument()->GetScriptContext()->GetJSValueFromMap( - resoveNodeRS.nodes.GetAt(i))); + resultValues->back()->Assign(pScriptContext->GetJSValueFromMap(pObject)); } return; } |