summaryrefslogtreecommitdiff
path: root/fxjs/cjs_eventhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_eventhandler.cpp')
-rw-r--r--fxjs/cjs_eventhandler.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/fxjs/cjs_eventhandler.cpp b/fxjs/cjs_eventhandler.cpp
index 2f42d4157f..0fd330fd13 100644
--- a/fxjs/cjs_eventhandler.cpp
+++ b/fxjs/cjs_eventhandler.cpp
@@ -580,10 +580,11 @@ CJS_Field* CJS_EventHandler::Source() {
if (pFieldObj.IsEmpty())
return nullptr;
- CJS_Document* pJSDocument =
- static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj));
- CJS_Field* pJSField =
- static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj));
+ auto* pJSDocument =
+ static_cast<CJS_Document*>(CFXJS_Engine::GetObjectPrivate(pDocObj));
+
+ auto* pJSField =
+ static_cast<CJS_Field*>(CFXJS_Engine::GetObjectPrivate(pFieldObj));
pJSDocument->SetFormFillEnv(m_pTargetFormFillEnv
? m_pTargetFormFillEnv.Get()
@@ -605,10 +606,11 @@ CJS_Field* CJS_EventHandler::Target_Field() {
if (pFieldObj.IsEmpty())
return nullptr;
- CJS_Document* pJSDocument =
- static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj));
- CJS_Field* pJSField =
- static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj));
+ auto* pJSDocument =
+ static_cast<CJS_Document*>(CFXJS_Engine::GetObjectPrivate(pDocObj));
+
+ auto* pJSField =
+ static_cast<CJS_Field*>(CFXJS_Engine::GetObjectPrivate(pFieldObj));
pJSDocument->SetFormFillEnv(m_pTargetFormFillEnv
? m_pTargetFormFillEnv.Get()