#include "fxjs/xfa/cfxjse_engine.h"
#include <utility>
#include "core/fxcrt/autorestorer.h"
#include "core/fxcrt/containers/contains.h"
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/stl_util.h"
#include "core/fxcrt/widetext_buffer.h"
#include "fxjs/cjs_runtime.h"
#include "fxjs/fxv8.h"
#include "fxjs/xfa/cfxjse_class.h"
#include "fxjs/xfa/cfxjse_context.h"
#include "fxjs/xfa/cfxjse_formcalc_context.h"
#include "fxjs/xfa/cfxjse_isolatetracker.h"
#include "fxjs/xfa/cfxjse_nodehelper.h"
#include "fxjs/xfa/cfxjse_resolveprocessor.h"
#include "fxjs/xfa/cfxjse_value.h"
#include "fxjs/xfa/cjx_object.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-function.h"
#include "v8/include/v8-local-handle.h"
#include "v8/include/v8-object.h"
#include "xfa/fxfa/cxfa_eventparam.h"
#include "xfa/fxfa/cxfa_ffdoc.h"
#include "xfa/fxfa/cxfa_ffnotify.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_localemgr.h"
#include "xfa/fxfa/parser/cxfa_node.h"
#include "xfa/fxfa/parser/cxfa_object.h"
#include "xfa/fxfa/parser/cxfa_thisproxy.h"
#include "xfa/fxfa/parser/cxfa_variables.h"
#include "xfa/fxfa/parser/xfa_basic_data.h"
#include "xfa/fxfa/parser/xfa_utils.h"
kClassTag;
const FXJSE_CLASS_DESCRIPTOR kGlobalClassDescriptor = …;
const FXJSE_CLASS_DESCRIPTOR kNormalClassDescriptor = …;
const FXJSE_CLASS_DESCRIPTOR kVariablesClassDescriptor = …;
namespace {
const char kFormCalcRuntime[] = …;
}
CFXJSE_Engine::ResolveResult::ResolveResult() = default;
CFXJSE_Engine::ResolveResult::ResolveResult(const ResolveResult& that) =
default;
CFXJSE_Engine::ResolveResult& CFXJSE_Engine::ResolveResult::operator=(
const ResolveResult& that) = default;
CFXJSE_Engine::ResolveResult::~ResolveResult() = default;
CXFA_Object* CFXJSE_Engine::ToObject(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
CXFA_Object* CFXJSE_Engine::ToObject(v8::Isolate* pIsolate,
v8::Local<v8::Value> value) { … }
CXFA_Object* CFXJSE_Engine::ToObject(v8::Isolate* pIsolate,
CFXJSE_Value* pValue) { … }
CXFA_Object* CFXJSE_Engine::ToObject(CFXJSE_HostObject* pHostObj) { … }
CFXJSE_Engine::CFXJSE_Engine(CXFA_Document* pDocument,
CJS_Runtime* fxjs_runtime)
: … { … }
CFXJSE_Engine::~CFXJSE_Engine() { … }
CFXJSE_Engine::EventParamScope::EventParamScope(CFXJSE_Engine* pEngine,
CXFA_Node* pTarget,
CXFA_EventParam* pEventParam)
: … { … }
CFXJSE_Engine::EventParamScope::~EventParamScope() { … }
CFXJSE_Context::ExecutionResult CFXJSE_Engine::RunScript(
CXFA_Script::Type eScriptType,
WideStringView wsScript,
CXFA_Object* pThisObject) { … }
bool CFXJSE_Engine::QueryNodeByFlag(CXFA_Node* refNode,
WideStringView propname,
v8::Local<v8::Value>* pValue,
Mask<XFA_ResolveFlag> dwFlag) { … }
bool CFXJSE_Engine::UpdateNodeByFlag(CXFA_Node* refNode,
WideStringView propname,
v8::Local<v8::Value> pValue,
Mask<XFA_ResolveFlag> dwFlag) { … }
void CFXJSE_Engine::GlobalPropertySetter(v8::Isolate* pIsolate,
v8::Local<v8::Object> pObject,
ByteStringView szPropName,
v8::Local<v8::Value> pValue) { … }
v8::Local<v8::Value> CFXJSE_Engine::GlobalPropertyGetter(
v8::Isolate* pIsolate,
v8::Local<v8::Object> pObject,
ByteStringView szPropName) { … }
FXJSE_ClassPropType CFXJSE_Engine::GlobalPropTypeGetter(
v8::Isolate* pIsolate,
v8::Local<v8::Object> pHolder,
ByteStringView szPropName,
bool bQueryIn) { … }
v8::Local<v8::Value> CFXJSE_Engine::NormalPropertyGetter(
v8::Isolate* pIsolate,
v8::Local<v8::Object> pHolder,
ByteStringView szPropName) { … }
void CFXJSE_Engine::NormalPropertySetter(v8::Isolate* pIsolate,
v8::Local<v8::Object> pHolder,
ByteStringView szPropName,
v8::Local<v8::Value> pValue) { … }
FXJSE_ClassPropType CFXJSE_Engine::NormalPropTypeGetter(
v8::Isolate* pIsolate,
v8::Local<v8::Object> pHolder,
ByteStringView szPropName,
bool bQueryIn) { … }
CJS_Result CFXJSE_Engine::NormalMethodCall(
const v8::FunctionCallbackInfo<v8::Value>& info,
const WideString& functionName) { … }
bool CFXJSE_Engine::IsStrictScopeInJavaScript() { … }
CXFA_Script::Type CFXJSE_Engine::GetType() { … }
void CFXJSE_Engine::AddObjectToUpArray(CXFA_Node* pNode) { … }
CXFA_Node* CFXJSE_Engine::LastObjectFromUpArray() { … }
CFXJSE_Context* CFXJSE_Engine::CreateVariablesContext(CXFA_Script* pScriptNode,
CXFA_Node* pSubform) { … }
CXFA_Object* CFXJSE_Engine::GetVariablesThis(CXFA_Object* pObject) { … }
CXFA_Object* CFXJSE_Engine::GetVariablesScript(CXFA_Object* pObject) { … }
void CFXJSE_Engine::RunVariablesScript(CXFA_Script* pScriptNode) { … }
CFXJSE_Context* CFXJSE_Engine::VariablesContextForScriptNode(
CXFA_Script* pScriptNode) { … }
bool CFXJSE_Engine::QueryVariableValue(CXFA_Script* pScriptNode,
ByteStringView szPropName,
v8::Local<v8::Value>* pValue) { … }
bool CFXJSE_Engine::UpdateVariableValue(CXFA_Script* pScriptNode,
ByteStringView szPropName,
v8::Local<v8::Value> pValue) { … }
void CFXJSE_Engine::RemoveBuiltInObjs(CFXJSE_Context* pContext) { … }
std::optional<CFXJSE_Engine::ResolveResult> CFXJSE_Engine::ResolveObjects(
CXFA_Object* refObject,
WideStringView wsExpression,
Mask<XFA_ResolveFlag> dwStyles) { … }
std::optional<CFXJSE_Engine::ResolveResult>
CFXJSE_Engine::ResolveObjectsWithBindNode(CXFA_Object* refObject,
WideStringView wsExpression,
Mask<XFA_ResolveFlag> dwStyles,
CXFA_Node* bindNode) { … }
v8::Local<v8::Object> CFXJSE_Engine::GetOrCreateJSBindingFromMap(
CXFA_Object* pObject) { … }
void CFXJSE_Engine::SetNodesOfRunScript(
std::vector<cppgc::Persistent<CXFA_Node>>* pArray) { … }
void CFXJSE_Engine::AddNodesOfRunScript(CXFA_Node* pNode) { … }
CXFA_Object* CFXJSE_Engine::ToXFAObject(v8::Local<v8::Value> obj) { … }
v8::Local<v8::Object> CFXJSE_Engine::NewNormalXFAObject(CXFA_Object* obj) { … }