Index: fpdfsdk/javascript/JS_EventHandler.cpp |
diff --git a/fpdfsdk/javascript/JS_EventHandler.cpp b/fpdfsdk/javascript/JS_EventHandler.cpp |
index 731d803d2c47b90ae3d9de2a0e1b51095b1d8a66..27223cfccb99d24ab4f4a05dca048d7a58e8bed6 100644 |
--- a/fpdfsdk/javascript/JS_EventHandler.cpp |
+++ b/fpdfsdk/javascript/JS_EventHandler.cpp |
@@ -602,9 +602,9 @@ Field* CJS_EventHandler::Source() { |
CJS_Document* pJSDocument = |
static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj)); |
Document* pDocument = (Document*)pJSDocument->GetEmbedObject(); |
- pDocument->AttachDoc(m_pTargetFormFillEnv |
- ? m_pTargetFormFillEnv->GetSDKDocument() |
- : m_pJSContext->GetFormFillEnv()->GetSDKDocument()); |
+ pDocument->SetFormFillEnv(m_pTargetFormFillEnv |
+ ? m_pTargetFormFillEnv |
+ : m_pJSContext->GetFormFillEnv()); |
CJS_Field* pJSField = |
static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj)); |
@@ -626,9 +626,9 @@ Field* CJS_EventHandler::Target_Field() { |
CJS_Document* pJSDocument = |
static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj)); |
Document* pDocument = (Document*)pJSDocument->GetEmbedObject(); |
- pDocument->AttachDoc(m_pTargetFormFillEnv |
- ? m_pTargetFormFillEnv->GetSDKDocument() |
- : m_pJSContext->GetFormFillEnv()->GetSDKDocument()); |
+ pDocument->SetFormFillEnv(m_pTargetFormFillEnv |
+ ? m_pTargetFormFillEnv |
+ : m_pJSContext->GetFormFillEnv()); |
CJS_Field* pJSField = |
static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj)); |