diff options
Diffstat (limited to 'fxjs/cfxjse_engine.cpp')
-rw-r--r-- | fxjs/cfxjse_engine.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp index 305e29a9cd..eb19573411 100644 --- a/fxjs/cfxjse_engine.cpp +++ b/fxjs/cfxjse_engine.cpp @@ -138,7 +138,7 @@ bool CFXJSE_Engine::RunScript(CXFA_Script::Type eScriptType, } else { btScript = FX_UTF8Encode(wsScript); } - AutoRestorer<CXFA_Object*> nodeRestorer(&m_pThisObject); + AutoRestorer<UnownedPtr<CXFA_Object>> nodeRestorer(&m_pThisObject); m_pThisObject = pThisObject; CFXJSE_Value* pValue = pThisObject ? GetJSValueFromMap(pThisObject) : nullptr; @@ -510,7 +510,7 @@ bool CFXJSE_Engine::RunVariablesScript(CXFA_Node* pScriptNode) { CXFA_Node* pThisObject = pParent->GetParent(); CFXJSE_Context* pVariablesContext = CreateVariablesContext(pScriptNode, pThisObject); - AutoRestorer<CXFA_Object*> nodeRestorer(&m_pThisObject); + AutoRestorer<UnownedPtr<CXFA_Object>> nodeRestorer(&m_pThisObject); m_pThisObject = pThisObject; return pVariablesContext->ExecuteScript(btScript.c_str(), hRetValue.get(), nullptr); @@ -563,10 +563,6 @@ void CFXJSE_Engine::RemoveBuiltInObjs(CFXJSE_Context* pContext) const { } } -CFXJSE_Class* CFXJSE_Engine::GetJseNormalClass() { - return m_pJsClass; -} - bool CFXJSE_Engine::ResolveObjects(CXFA_Object* refObject, const WideStringView& wsExpression, XFA_RESOLVENODE_RS* resolveNodeRS, @@ -753,7 +749,7 @@ CFXJSE_Value* CFXJSE_Engine::GetJSValueFromMap(CXFA_Object* pObject) { return iter->second.get(); auto jsValue = pdfium::MakeUnique<CFXJSE_Value>(GetIsolate()); - jsValue->SetObject(pObject, m_pJsClass); + jsValue->SetObject(pObject, m_pJsClass.Get()); CFXJSE_Value* pValue = jsValue.get(); m_mapObjectToValue.insert(std::make_pair(pObject, std::move(jsValue))); |