diff options
-rw-r--r-- | fxjs/cfxjse_engine.cpp | 17 | ||||
-rw-r--r-- | fxjs/cfxjse_engine.h | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp index ef6212e3f3..aab38467cc 100644 --- a/fxjs/cfxjse_engine.cpp +++ b/fxjs/cfxjse_engine.cpp @@ -185,7 +185,7 @@ void CFXJSE_Engine::GlobalPropertySetter(CFXJSE_Value* pObject, CFXJSE_Engine* lpScriptContext = pDoc->GetScriptContext(); CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject()); if (lpOrginalNode->IsThisProxy()) - pRefNode = ToNode(lpScriptContext->GetVariablesThis(lpOrginalNode)); + pRefNode = ToNode(lpScriptContext->GetVariablesThis(lpOrginalNode, false)); WideString wsPropName = WideString::FromUTF8(szPropName); if (lpScriptContext->QueryNodeByFlag( @@ -238,7 +238,8 @@ void CFXJSE_Engine::GlobalPropertyGetter(CFXJSE_Value* pObject, CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject()); if (pOriginalObject->IsThisProxy()) - pRefNode = ToNode(lpScriptContext->GetVariablesThis(pOriginalObject)); + pRefNode = + ToNode(lpScriptContext->GetVariablesThis(pOriginalObject, false)); if (lpScriptContext->QueryNodeByFlag( pRefNode, wsPropName.AsStringView(), pValue, @@ -278,7 +279,7 @@ int32_t CFXJSE_Engine::GlobalPropTypeGetter(CFXJSE_Value* pOriginalValue, return FXJSE_ClassPropType_None; CFXJSE_Engine* lpScriptContext = pObject->GetDocument()->GetScriptContext(); - pObject = lpScriptContext->GetVariablesThis(pObject); + pObject = lpScriptContext->GetVariablesThis(pObject, false); WideString wsPropName = WideString::FromUTF8(szPropName); if (pObject->JSObject()->HasMethod(wsPropName)) return FXJSE_ClassPropType_Method; @@ -298,7 +299,8 @@ void CFXJSE_Engine::NormalPropertyGetter(CFXJSE_Value* pOriginalValue, WideString wsPropName = WideString::FromUTF8(szPropName); CFXJSE_Engine* lpScriptContext = pOriginalObject->GetDocument()->GetScriptContext(); - CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject); + CXFA_Object* pObject = + lpScriptContext->GetVariablesThis(pOriginalObject, false); if (wsPropName == L"xfa") { CFXJSE_Value* pValue = lpScriptContext->GetJSValueFromMap( lpScriptContext->GetDocument()->GetRoot()); @@ -369,7 +371,8 @@ void CFXJSE_Engine::NormalPropertySetter(CFXJSE_Value* pOriginalValue, CFXJSE_Engine* lpScriptContext = pOriginalObject->GetDocument()->GetScriptContext(); - CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject); + CXFA_Object* pObject = + lpScriptContext->GetVariablesThis(pOriginalObject, false); WideString wsPropName = WideString::FromUTF8(szPropName); const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = XFA_GetScriptAttributeByName( pObject->GetElementType(), wsPropName.AsStringView()); @@ -421,7 +424,7 @@ int32_t CFXJSE_Engine::NormalPropTypeGetter(CFXJSE_Value* pOriginalValue, return FXJSE_ClassPropType_None; CFXJSE_Engine* lpScriptContext = pObject->GetDocument()->GetScriptContext(); - pObject = lpScriptContext->GetVariablesThis(pObject); + pObject = lpScriptContext->GetVariablesThis(pObject, false); XFA_Element eType = pObject->GetElementType(); WideString wsPropName = WideString::FromUTF8(szPropName); if (pObject->JSObject()->HasMethod(wsPropName)) @@ -442,7 +445,7 @@ CJS_Return CFXJSE_Engine::NormalMethodCall( return CJS_Return(L"no Holder() present."); CFXJSE_Engine* lpScriptContext = pObject->GetDocument()->GetScriptContext(); - pObject = lpScriptContext->GetVariablesThis(pObject); + pObject = lpScriptContext->GetVariablesThis(pObject, false); std::vector<v8::Local<v8::Value>> parameters; for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) diff --git a/fxjs/cfxjse_engine.h b/fxjs/cfxjse_engine.h index b85a4f1ae2..380965e8d3 100644 --- a/fxjs/cfxjse_engine.h +++ b/fxjs/cfxjse_engine.h @@ -100,7 +100,7 @@ class CFXJSE_Engine : public CFX_V8 { uint32_t dwFlag, bool bSetting); bool IsStrictScopeInJavaScript(); - CXFA_Object* GetVariablesThis(CXFA_Object* pObject, bool bScriptNode = false); + CXFA_Object* GetVariablesThis(CXFA_Object* pObject, bool bScriptNode); bool QueryVariableValue(CXFA_Node* pScriptNode, const ByteStringView& szPropName, CFXJSE_Value* pValue, |