7#include "fxjs/xfa/cfxjse_engine.h"
11#include "core/fxcrt/autorestorer.h"
12#include "core/fxcrt/fx_extension.h"
13#include "core/fxcrt/stl_util.h"
14#include "core/fxcrt/widetext_buffer.h"
15#include "fxjs/cjs_runtime.h"
17#include "fxjs/xfa/cfxjse_class.h"
18#include "fxjs/xfa/cfxjse_context.h"
19#include "fxjs/xfa/cfxjse_formcalc_context.h"
20#include "fxjs/xfa/cfxjse_isolatetracker.h"
21#include "fxjs/xfa/cfxjse_nodehelper.h"
22#include "fxjs/xfa/cfxjse_resolveprocessor.h"
23#include "fxjs/xfa/cfxjse_value.h"
24#include "fxjs/xfa/cjx_object.h"
25#include "third_party/base/containers/contains.h"
26#include "v8/include/v8-function-callback.h"
27#include "v8/include/v8-function.h"
28#include "v8/include/v8-local-handle.h"
29#include "v8/include/v8-object.h"
30#include "xfa/fxfa/cxfa_eventparam.h"
31#include "xfa/fxfa/cxfa_ffdoc.h"
32#include "xfa/fxfa/cxfa_ffnotify.h"
33#include "xfa/fxfa/parser/cxfa_document.h"
34#include "xfa/fxfa/parser/cxfa_localemgr.h"
35#include "xfa/fxfa/parser/cxfa_node.h"
36#include "xfa/fxfa/parser/cxfa_object.h"
37#include "xfa/fxfa/parser/cxfa_thisproxy.h"
38#include "xfa/fxfa/parser/cxfa_variables.h"
39#include "xfa/fxfa/parser/xfa_basic_data.h"
40#include "xfa/fxfa/parser/xfa_utils.h"
42using pdfium::
fxjse::kClassTag;
49 CFXJSE_Engine::GlobalPropTypeGetter,
50 CFXJSE_Engine::GlobalPropertyGetter,
51 CFXJSE_Engine::GlobalPropertySetter,
52 CFXJSE_Engine::NormalMethodCall,
60 CFXJSE_Engine::NormalPropTypeGetter,
61 CFXJSE_Engine::NormalPropertyGetter,
62 CFXJSE_Engine::NormalPropertySetter,
63 CFXJSE_Engine::NormalMethodCall,
71 CFXJSE_Engine::NormalPropTypeGetter,
72 CFXJSE_Engine::GlobalPropertyGetter,
73 CFXJSE_Engine::GlobalPropertySetter,
74 CFXJSE_Engine::NormalMethodCall,
79const char kFormCalcRuntime[] =
"pfm_rt";
95 const v8::FunctionCallbackInfo<v8::Value>& info) {
96 return ToObject(info.GetIsolate(), info.Holder());
101 v8::Local<v8::Value> value) {
102 if (!value->IsObject())
105 return ToObject(FXJSE_RetrieveObjectBinding(value.As<v8::Object>()));
111 return ToObject(pValue->ToHostObject(pIsolate)
);
124 CJS_Runtime* fxjs_runtime)
125 :
CFX_V8(fxjs_runtime->GetIsolate()),
135 RemoveBuiltInObjs(m_JsContext.get());
136 m_JsContext->EnableCompatibleMode();
141 CFXJSE_Class::Create(m_JsContext.get(), &kNormalClassDescriptor,
false);
148 for (
const auto& pair : m_mapObjectToObject) {
149 const v8::Global<v8::Object>& binding = pair.second;
150 FXJSE_ClearObjectBinding(v8::Local<v8::Object>::New(GetIsolate(), binding));
160 m_pEngine->m_pTarget = pTarget;
161 m_pEngine->m_eventParam = pEventParam;
165 m_pEngine->m_pTarget = m_pPrevTarget;
166 m_pEngine->m_eventParam = m_pPrevEventParam;
170 CXFA_Script::
Type eScriptType,
171 WideStringView wsScript,
175 m_eScriptType = eScriptType;
179 if (!m_FormCalcContext) {
180 m_FormCalcContext = std::make_unique<CFXJSE_FormCalcContext>(
181 GetIsolate(), m_JsContext.get(), m_pDocument.Get());
183 absl::optional<WideTextBuffer> wsJavaScript =
184 CFXJSE_FormCalcContext::Translate(m_pDocument->GetHeap(), wsScript);
185 if (!wsJavaScript.has_value()) {
187 undefined_value->SetUndefined(GetIsolate());
190 btScript = FX_UTF8Encode(wsJavaScript.value().AsStringView());
192 btScript = FX_UTF8Encode(wsScript);
194 AutoRestorer<cppgc::Persistent<CXFA_Object>> nodeRestorer(&m_pThisObject);
195 m_pThisObject = pThisObject;
197 v8::Local<v8::Object> pThisBinding;
199 pThisBinding = GetOrCreateJSBindingFromMap(pThisObject);
202 return m_JsContext->ExecuteScript(btScript.AsStringView(), pThisBinding);
206 WideStringView propname,
207 v8::Local<v8::Value>* pValue,
212 absl::optional<CFXJSE_Engine::ResolveResult> maybeResult =
213 ResolveObjects(refNode, propname, dwFlag);
214 if (!maybeResult.has_value())
217 if (maybeResult.value().type == ResolveResult::Type::kNodes) {
219 GetOrCreateJSBindingFromMap(maybeResult.value().objects.front().Get());
222 if (maybeResult.value().type == ResolveResult::Type::kAttribute &&
223 maybeResult.value().script_attribute.callback) {
224 CJX_Object* jsObject = maybeResult.value().objects.front()->JSObject();
225 (*maybeResult.value().script_attribute.callback)(
226 GetIsolate(), jsObject, pValue,
false,
227 maybeResult.value().script_attribute.attribute);
233 WideStringView propname,
234 v8::Local<v8::Value> pValue,
239 absl::optional<CFXJSE_Engine::ResolveResult> maybeResult =
240 ResolveObjects(refNode, propname, dwFlag);
241 if (!maybeResult.has_value())
244 if (maybeResult.value().type == ResolveResult::Type::kAttribute &&
245 maybeResult.value().script_attribute.callback) {
246 CJX_Object* jsObject = maybeResult.value().objects.front()->JSObject();
247 (*maybeResult.value().script_attribute.callback)(
248 GetIsolate(), jsObject, &pValue,
true,
249 maybeResult.value().script_attribute.attribute);
256 v8::Local<v8::Object> pObject,
257 ByteStringView szPropName,
258 v8::Local<v8::Value> pValue) {
259 CXFA_Object* pOriginalNode = ToObject(pIsolate, pObject);
264 pRefNode =
ToNode(pScriptContext->GetVariablesThis(pOriginalNode)
);
266 WideString wsPropName = WideString
::FromUTF8(szPropName
);
267 if (pScriptContext->UpdateNodeByFlag(
268 pRefNode, wsPropName.AsStringView(), pValue,
269 Mask<XFA_ResolveFlag>{
276 fxv8::ReentrantDeleteObjectPropertyHelper(pScriptContext->GetIsolate(),
277 pObject, szPropName);
290 pCJSRuntime->SetValueByNameInGlobalObject(szPropName, pValue);
295 v8::Isolate* pIsolate,
296 v8::Local<v8::Object> pObject,
297 ByteStringView szPropName) {
298 CXFA_Object* pOriginalObject = ToObject(pIsolate, pObject);
301 WideString wsPropName = WideString
::FromUTF8(szPropName
);
304 v8::Local<v8::Value> pValue = fxv8::NewUndefinedHelper(pIsolate);
307 if (szPropName == kFormCalcRuntime)
308 return pScriptContext->m_FormCalcContext->GlobalPropertyGetter();
311 static_cast<
XFA_HashCode>(FX_HashCode_GetW(wsPropName.AsStringView()));
316 return pScriptContext->GetOrCreateJSBindingFromMap(pObj);
322 pRefNode =
ToNode(pScriptContext->GetVariablesThis(pOriginalObject)
);
324 if (pScriptContext->QueryNodeByFlag(
325 pRefNode, wsPropName.AsStringView(), &pValue,
326 Mask<XFA_ResolveFlag>{XFA_ResolveFlag::kChildren,
327 XFA_ResolveFlag::kProperties,
328 XFA_ResolveFlag::kAttributes})) {
331 if (pScriptContext->QueryNodeByFlag(
332 pRefNode, wsPropName.AsStringView(), &pValue,
333 Mask<XFA_ResolveFlag>{XFA_ResolveFlag::kParent,
334 XFA_ResolveFlag::kSiblings})) {
339 pScriptContext->GetVariablesScript(pOriginalObject);
340 if (pScriptObject && pScriptContext->QueryVariableValue(
341 CXFA_Script::FromNode(pScriptObject->AsNode()),
342 szPropName, &pValue)) {
356 v8::Local<v8::Value> temp_value =
357 pCJSRuntime->GetValueByNameFromGlobalObject(szPropName);
359 return !temp_value.IsEmpty() ? temp_value : pValue;
364 v8::Isolate* pIsolate,
365 v8::Local<v8::Object> pHolder,
366 ByteStringView szPropName,
368 CXFA_Object* pObject = ToObject(pIsolate, pHolder);
373 pObject = pScriptContext->GetVariablesThis(pObject);
374 WideString wsPropName = WideString
::FromUTF8(szPropName
);
383 v8::Isolate* pIsolate,
384 v8::Local<v8::Object> pHolder,
385 ByteStringView szPropName) {
386 CXFA_Object* pOriginalObject = ToObject(pIsolate, pHolder);
387 if (!pOriginalObject)
388 return fxv8::NewUndefinedHelper(pIsolate);
393 WideString wsPropName = WideString
::FromUTF8(szPropName
);
395 return pScriptContext->GetOrCreateJSBindingFromMap(
399 v8::Local<v8::Value> pReturnValue = fxv8::NewUndefinedHelper(pIsolate);
400 CXFA_Object* pObject = pScriptContext->GetVariablesThis(pOriginalObject);
402 if (pScriptContext->QueryNodeByFlag(
403 pRefNode, wsPropName.AsStringView(), &pReturnValue,
404 Mask<XFA_ResolveFlag>{XFA_ResolveFlag::kChildren,
405 XFA_ResolveFlag::kProperties,
406 XFA_ResolveFlag::kAttributes})) {
411 !pScriptContext->IsStrictScopeInJavaScript())) {
412 if (pScriptContext->QueryNodeByFlag(
413 pRefNode, wsPropName.AsStringView(), &pReturnValue,
414 Mask<XFA_ResolveFlag>{XFA_ResolveFlag::kParent,
415 XFA_ResolveFlag::kSiblings})) {
420 pScriptContext->GetVariablesScript(pOriginalObject);
424 if (pScriptContext->QueryVariableValue(
425 CXFA_Script::FromNode(pScriptObject->AsNode()), szPropName,
429 absl::optional<XFA_SCRIPTATTRIBUTEINFO> info = XFA_GetScriptAttributeByName(
430 pObject->GetElementType(), wsPropName.AsStringView());
431 if (info.has_value()) {
432 (*info.value().callback)(pIsolate, pObject->JSObject(), &pReturnValue,
433 false, info.value().attribute);
447 v8::Local<v8::Value> temp_local =
448 pCJSRuntime->GetValueByNameFromGlobalObject(szPropName);
450 return !temp_local.IsEmpty() ? temp_local : pReturnValue;
455 v8::Local<v8::Object> pHolder,
456 ByteStringView szPropName,
457 v8::Local<v8::Value> pValue) {
458 CXFA_Object* pOriginalObject = ToObject(pIsolate, pHolder);
459 if (!pOriginalObject)
467 CXFA_Object* pObject = pScriptContext->GetVariablesThis(pOriginalObject);
468 WideString wsPropName = WideString
::FromUTF8(szPropName
);
469 WideStringView wsPropNameView = wsPropName.AsStringView();
470 absl::optional<XFA_SCRIPTATTRIBUTEINFO> info =
471 XFA_GetScriptAttributeByName(pObject->GetElementType(), wsPropNameView);
472 if (info.has_value()) {
474 (*info.value().callback)(pIsolate, jsObject, &pValue,
true,
475 info.value().attribute);
480 if (wsPropNameView[0] ==
'#')
481 wsPropNameView = wsPropNameView.Last(wsPropNameView.GetLength() - 1);
485 XFA_Element eType = XFA_GetElementByName(wsPropNameView);
488 pNode->JSObject()->GetOrCreateProperty<
CXFA_Node>(0, eType);
490 pPropOrChild = pNode->GetFirstChildByName(wsPropNameView);
494 info = XFA_GetScriptAttributeByName(pPropOrChild->GetElementType(),
496 if (info.has_value()) {
497 pPropOrChild->JSObject()->ScriptSomDefaultValue(pIsolate, &pValue,
true,
505 pScriptContext->GetVariablesScript(pOriginalObject);
507 pScriptContext->UpdateVariableValue(
513 v8::Isolate* pIsolate,
514 v8::Local<v8::Object> pHolder,
515 ByteStringView szPropName,
517 CXFA_Object* pObject = ToObject(pIsolate, pHolder);
522 pObject = pScriptContext->GetVariablesThis(pObject);
524 WideString wsPropName = WideString
::FromUTF8(szPropName
);
529 absl::optional<XFA_SCRIPTATTRIBUTEINFO> maybe_info =
530 XFA_GetScriptAttributeByName(eType, wsPropName.AsStringView());
531 if (!maybe_info.has_value())
538 const v8::FunctionCallbackInfo<v8::Value>& info,
539 const WideString& functionName) {
545 pObject = pScriptContext->GetVariablesThis(pObject);
547 v8::LocalVector<v8::Value> parameters(info.GetIsolate());
548 for (
int i = 0; i < info.Length(); i++)
549 parameters.push_back(info[i]);
551 return pObject->JSObject()->RunMethod(pScriptContext, functionName,
556 return m_pDocument->is_strict_scoping();
560 return m_eScriptType;
564 m_upObjectArray.push_back(pNode);
568 return !m_upObjectArray.empty() ? m_upObjectArray.back() :
nullptr;
573 if (!pScriptNode || !pSubform)
576 auto* proxy = cppgc::MakeGarbageCollected<CXFA_ThisProxy>(
577 pScriptNode->GetDocument()->GetHeap()->GetAllocationHandle(), pSubform,
579 auto pNewContext = CFXJSE_Context::Create(
580 GetIsolate(), &kVariablesClassDescriptor, proxy->JSObject(), proxy);
581 RemoveBuiltInObjs(pNewContext.get());
582 pNewContext->EnableCompatibleMode();
584 m_mapVariableToContext[pScriptNode->JSObject()] = std::move(pNewContext);
598void CFXJSE_Engine::RunVariablesScript(CXFA_Script* pScriptNode) {
602 auto* pParent = CXFA_Variables
::FromNode(pScriptNode->GetParent()
);
606 auto it = m_mapVariableToContext.find(pScriptNode->JSObject());
607 if (it != m_mapVariableToContext.end() && it->second)
610 CXFA_Node* pTextNode = pScriptNode->GetFirstChild();
614 absl::optional<WideString> wsScript =
615 pTextNode->JSObject()->TryCData(XFA_Attribute::Value,
true);
616 if (!wsScript.has_value())
619 ByteString btScript = wsScript->ToUTF8();
620 CXFA_Node* pThisObject = pParent->GetParent();
622 CreateVariablesContext(pScriptNode, pThisObject);
623 AutoRestorer<cppgc::Persistent<CXFA_Object>> nodeRestorer(&m_pThisObject);
624 m_pThisObject = pThisObject;
625 pVariablesContext->ExecuteScript(btScript.AsStringView(),
626 v8::Local<v8::Object>());
630 CXFA_Script* pScriptNode) {
634 auto* variablesNode = CXFA_Variables
::FromNode(pScriptNode->GetParent()
);
638 auto it = m_mapVariableToContext.find(pScriptNode->JSObject());
639 return it != m_mapVariableToContext.end() ? it->second.get() :
nullptr;
642bool CFXJSE_Engine::QueryVariableValue(CXFA_Script* pScriptNode,
643 ByteStringView szPropName,
644 v8::Local<v8::Value>* pValue) {
645 CFXJSE_Context* pVariableContext = VariablesContextForScriptNode(pScriptNode);
646 if (!pVariableContext)
649 v8::Local<v8::Object> pObject = pVariableContext->GetGlobalObject();
650 if (!fxv8::ReentrantHasObjectOwnPropertyHelper(GetIsolate(), pObject,
655 v8::Local<v8::Value> hVariableValue =
656 fxv8::ReentrantGetObjectPropertyHelper(GetIsolate(), pObject, szPropName);
657 if (fxv8::IsFunction(hVariableValue)) {
658 v8::Local<v8::Function> maybeFunc = CFXJSE_Value::NewBoundFunction(
659 GetIsolate(), hVariableValue.As<v8::Function>(), pObject);
660 if (!maybeFunc.IsEmpty())
663 *pValue = hVariableValue;
668bool CFXJSE_Engine::UpdateVariableValue(CXFA_Script* pScriptNode,
669 ByteStringView szPropName,
670 v8::Local<v8::Value> pValue) {
671 CFXJSE_Context* pVariableContext = VariablesContextForScriptNode(pScriptNode);
672 if (!pVariableContext)
675 v8::Local<v8::Object> pObject = pVariableContext->GetGlobalObject();
676 fxv8::ReentrantSetObjectOwnPropertyHelper(GetIsolate(), pObject, szPropName,
683 v8::Local<v8::Object> pObject = pContext->GetGlobalObject();
684 fxv8::ReentrantDeleteObjectPropertyHelper(GetIsolate(), pObject,
"Number");
685 fxv8::ReentrantDeleteObjectPropertyHelper(GetIsolate(), pObject,
"Date");
690 WideStringView wsExpression,
692 return ResolveObjectsWithBindNode(refObject, wsExpression, dwStyles,
nullptr);
697 WideStringView wsExpression,
700 if (wsExpression.IsEmpty())
701 return absl::nullopt;
703 AutoRestorer<
bool> resolving_restorer(&m_bResolvingNodes);
704 m_bResolvingNodes =
true;
706 const bool bParentOrSiblings =
709 if (m_eScriptType != CXFA_Script::Type::Formcalc || bParentOrSiblings)
710 m_upObjectArray.clear();
711 if (refObject && refObject->IsNode() && bParentOrSiblings)
712 m_upObjectArray.push_back(refObject->AsNode());
715 bool bNextCreate =
false;
716 if (dwStyles & XFA_ResolveFlag::kCreateNode)
717 m_NodeHelper->SetCreateNodeType(bindNode);
719 m_NodeHelper->m_pCreateParent =
nullptr;
720 m_NodeHelper->m_iCurAllStart = -1;
726 std::vector<cppgc::Member<CXFA_Object>> findObjects;
727 findObjects.emplace_back(refObject ? refObject : m_pDocument->GetRoot());
731 nNodes = fxcrt::CollectionSize<int32_t>(findObjects);
733 rndFind.m_dwStyles = dwStyles;
734 m_ResolveProcessor->SetCurStart(nStart);
735 nStart = m_ResolveProcessor->GetFilter(wsExpression, nStart, rndFind);
739 nStart = m_NodeHelper->m_iCurAllStart;
741 pDataNode = m_pDocument->GetNotBindNode(findObjects);
744 findObjects.emplace_back(pDataNode);
748 pDataNode = findObjects.front()->AsNode();
750 findObjects.emplace_back(pDataNode);
755 findObjects.emplace_back(m_NodeHelper->m_pAllStartParent.Get());
761 int32_t checked_length =
762 pdfium::base::checked_cast<int32_t>(wsExpression.GetLength());
763 if (m_NodeHelper->CreateNode(rndFind.m_wsName, rndFind.m_wsCondition,
764 nStart == checked_length,
this)) {
769 std::vector<cppgc::Member<CXFA_Object>> retObjects;
771 bool bDataBind =
false;
776 m_ResolveProcessor->GetFilter(wsExpression, nStart, rndBind);
777 i = m_ResolveProcessor->IndexForDataBind(rndBind.m_wsCondition, nNodes);
780 rndFind.m_CurObject = findObjects[i++].Get();
783 if (!m_ResolveProcessor->Resolve(GetIsolate(), rndFind))
789 pdfium::base::checked_cast<int32_t>(wsExpression.GetLength())) {
790 v8::Local<v8::Value> pValue;
792 (*rndFind.m_Result.script_attribute.callback)(
793 GetIsolate(), jsObject, &pValue,
false,
794 rndFind.m_Result.script_attribute.attribute);
795 if (!pValue.IsEmpty()) {
796 rndFind.m_Result.objects.front() = ToObject(GetIsolate(), pValue);
799 if (!m_upObjectArray.empty())
800 m_upObjectArray.pop_back();
801 retObjects.insert(retObjects.end(), rndFind.m_Result.objects.begin(),
802 rndFind.m_Result.objects.end());
809 nNodes = fxcrt::CollectionSize<int32_t>(retObjects);
813 if (!m_NodeHelper->m_pCreateParent) {
814 m_NodeHelper->m_pCreateParent = ToNode(rndFind.m_CurObject);
815 m_NodeHelper->m_iCreateCount = 1;
817 int32_t checked_length =
818 pdfium::base::checked_cast<int32_t>(wsExpression.GetLength());
819 if (m_NodeHelper->CreateNode(rndFind.m_wsName, rndFind.m_wsCondition,
820 nStart == checked_length,
this)) {
827 findObjects = std::move(retObjects);
839 result.objects.insert(result.objects.end(), findObjects.begin(),
850 if (m_NodeHelper->m_pCreateParent)
851 result.objects.emplace_back(m_NodeHelper->m_pCreateParent.Get());
853 m_NodeHelper->CreateNodeForCondition(rndFind.m_wsCondition);
855 result.type = m_NodeHelper->m_iCreateFlag;
857 if (m_NodeHelper->m_iCurAllStart != -1)
864 if (result.objects.empty())
865 return absl::nullopt;
870 return absl::nullopt;
880 auto iter = m_mapObjectToObject.find(pCJXObject);
881 if (iter != m_mapObjectToObject.end())
882 return v8::Local<v8::Object>::New(GetIsolate(), iter->second);
884 v8::Local<v8::Object> binding = pCJXObject->NewBoundV8Object(
885 GetIsolate(), m_pJsClass->GetTemplate(GetIsolate()));
887 m_mapObjectToObject[pCJXObject].Reset(GetIsolate(), binding);
893 m_pScriptNodeArray = pArray;
897 if (m_pScriptNodeArray && !pdfium::Contains(*m_pScriptNodeArray, pNode))
898 m_pScriptNodeArray->emplace_back(pNode);
902 if (!fxv8::IsObject(obj))
905 CFXJSE_HostObject* pHostObj =
906 FXJSE_RetrieveObjectBinding(obj.As<v8::Object>());
910 CJX_Object* pJSObject = pHostObj->AsCJXObject();
911 return pJSObject ? pJSObject->GetXFAObject() :
nullptr;
915 v8::EscapableHandleScope scope(GetIsolate());
916 v8::Local<v8::Object> object = obj->JSObject()->NewBoundV8Object(
917 GetIsolate(), GetJseNormalClass()->GetTemplate(GetIsolate()));
918 return scope.Escape(object);
const FXJSE_CLASS_DESCRIPTOR kNormalClassDescriptor
const FXJSE_CLASS_DESCRIPTOR kGlobalClassDescriptor
const FXJSE_CLASS_DESCRIPTOR kVariablesClassDescriptor
EventParamScope(CFXJSE_Engine *pEngine, CXFA_Node *pTarget, CXFA_EventParam *pEventParam)
ResolveResult & operator=(const ResolveResult &that)
XFA_SCRIPTATTRIBUTEINFO script_attribute
ResolveResult(const ResolveResult &that)
bool IsResolvingNodes() const
CFXJSE_Engine(CXFA_Document *pDocument, CJS_Runtime *fxjs_runtime)
CXFA_Object * GetThisObject() const
CXFA_Script::Type GetType()
void AddNodesOfRunScript(CXFA_Node *pNode)
void SetNodesOfRunScript(std::vector< cppgc::Persistent< CXFA_Node > > *pArray)
friend class EventParamScope
static CXFA_Object * ToObject(v8::Isolate *pIsolate, CFXJSE_Value *pValue)
absl::optional< ResolveResult > ResolveObjectsWithBindNode(CXFA_Object *refObject, WideStringView wsExpression, Mask< XFA_ResolveFlag > dwStyles, CXFA_Node *bindNode)
v8::Local< v8::Object > NewNormalXFAObject(CXFA_Object *obj)
CFXJSE_Context::ExecutionResult RunScript(CXFA_Script::Type eScriptType, WideStringView wsScript, CXFA_Object *pThisObject)
CXFA_Node * LastObjectFromUpArray()
~CFXJSE_Engine() override
absl::optional< ResolveResult > ResolveObjects(CXFA_Object *refObject, WideStringView wsExpression, Mask< XFA_ResolveFlag > dwStyles)
static CXFA_Object * ToObject(CFXJSE_HostObject *pHostObj)
CXFA_Document * GetDocument() const
void AddObjectToUpArray(CXFA_Node *pNode)
v8::Local< v8::Object > GetOrCreateJSBindingFromMap(CXFA_Object *pObject)
virtual CJX_Object * AsCJXObject()
CFXJSE_Engine::ResolveResult m_Result
CFXJSE_ScopeUtil_IsolateHandleContext(CFXJSE_Context *pContext)
static CJS_Result Failure(const WideString &str)
bool HasMethod(const WideString &func) const
CXFA_Object * GetXFAObject() const
CXFA_FFNotify * GetNotify() const
CFXJSE_Engine * GetScriptContext() const
CXFA_Object * GetXFAObject(XFA_HashCode wsNodeNameHash)
CXFA_Node * GetRoot() const
IJS_Runtime * GetIJSRuntime() const
CXFA_FFDoc * GetFFDoc() const
XFA_Element GetElementType() const
CXFA_Document * GetDocument() const
static CXFA_Script * FromNode(CXFA_Node *pNode)
CXFA_Script * GetScriptNode() const
CXFA_Node * GetThisNode() const
static CXFA_Variables * FromNode(CXFA_Node *pNode)
static WideString FromUTF8(ByteStringView str)
bool EqualsASCII(ByteStringView that) const
CXFA_ThisProxy * ToThisProxy(CXFA_Object *pObj)
CXFA_Node * ToNode(CXFA_Object *pObj)
bool IsUndefined(v8::Local< v8::Value > value)
XFA_ATTRIBUTE_CALLBACK callback