From 2614250d4f11ed02033a7da095a1694ece12ab78 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 13 Dec 2017 18:29:02 +0000 Subject: Methods are on CJX_Object not CJX_Node now This CL converts all of the JSNode() to JSObject() calls as all of the original CJX_Node methods have been moved to CJX_Object. This fixes potential bad casts from things like CJX_Content which do not inhert from CJX_Node. Bug: pdfium:793372 Change-Id: I6c7f63a78f3d47bb6bad74faed3fd8c535bf095e Reviewed-on: https://pdfium-review.googlesource.com/21090 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- fxjs/cfxjse_formcalc_context.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fxjs/cfxjse_formcalc_context.cpp') diff --git a/fxjs/cfxjse_formcalc_context.cpp b/fxjs/cfxjse_formcalc_context.cpp index 1777102e06..b02e5a9d41 100644 --- a/fxjs/cfxjse_formcalc_context.cpp +++ b/fxjs/cfxjse_formcalc_context.cpp @@ -5853,8 +5853,8 @@ void CFXJSE_FormCalcContext::GetObjectDefaultValue( pDefaultValue->SetNull(); return; } - pNode->JSNode()->Script_Som_DefaultValue(pDefaultValue, false, - XFA_Attribute::Unknown); + pNode->JSObject()->Script_Som_DefaultValue(pDefaultValue, false, + XFA_Attribute::Unknown); } // static @@ -5864,8 +5864,8 @@ bool CFXJSE_FormCalcContext::SetObjectDefaultValue(CFXJSE_Value* pValue, if (!pNode) return false; - pNode->JSNode()->Script_Som_DefaultValue(hNewValue, true, - XFA_Attribute::Unknown); + pNode->JSObject()->Script_Som_DefaultValue(hNewValue, true, + XFA_Attribute::Unknown); return true; } @@ -5951,7 +5951,7 @@ bool CFXJSE_FormCalcContext::ResolveObjects(CFXJSE_Value* pThis, WideString wsName; if (CXFA_Node* pXFANode = pNode->AsNode()) { pdfium::Optional ret = - pXFANode->JSNode()->TryAttribute(XFA_Attribute::Name, false); + pXFANode->JSObject()->TryAttribute(XFA_Attribute::Name, false); if (ret) wsName = *ret; } -- cgit v1.2.3