summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_fm2jscontext.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp11
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;
}