diff options
Diffstat (limited to 'fxjs/cfxjse_engine.cpp')
-rw-r--r-- | fxjs/cfxjse_engine.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp index ff2bcc4618..6c8830923f 100644 --- a/fxjs/cfxjse_engine.cpp +++ b/fxjs/cfxjse_engine.cpp @@ -96,6 +96,7 @@ CXFA_Object* CFXJSE_Engine::ToObject(CFXJSE_Value* pValue, CFXJSE_Engine::CFXJSE_Engine(CXFA_Document* pDocument, CFXJS_Engine* fxjs_engine) : CFX_V8(fxjs_engine->GetIsolate()), + m_pSubordinateEngine(fxjs_engine), m_pDocument(pDocument), m_JsContext(CFXJSE_Context::Create(fxjs_engine->GetIsolate(), fxjs_engine, @@ -447,9 +448,9 @@ CFXJSE_Context* CFXJSE_Engine::CreateVariablesContext(CXFA_Node* pScriptNode, if (!pScriptNode || !pSubform) return nullptr; - auto pNewContext = - CFXJSE_Context::Create(GetIsolate(), nullptr, &VariablesClassDescriptor, - new CXFA_ThisProxy(pSubform, pScriptNode)); + auto pNewContext = CFXJSE_Context::Create( + GetIsolate(), m_pSubordinateEngine.Get(), &VariablesClassDescriptor, + new CXFA_ThisProxy(pSubform, pScriptNode)); RemoveBuiltInObjs(pNewContext.get()); pNewContext->EnableCompatibleMode(); CFXJSE_Context* pResult = pNewContext.get(); |