diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-11 12:38:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-11 12:38:01 -0700 |
commit | 82e1767b757d96e6b81d3e42b24048a9bea387a8 (patch) | |
tree | b7d14dfcd42ce6acf7a5552be0ff185cf0a9ed58 /fpdfsdk/fpdfxfa | |
parent | 9fa95efa11f211a6faf9b2adb27211f784aee89a (diff) | |
download | pdfium-82e1767b757d96e6b81d3e42b24048a9bea387a8.tar.xz |
Convert IJS_Runtime to CPDFSDK_FormFillEnvironment
This CL changes the use of CPDFSDK_Document to CPDFSDK_FormFillEnvironment.
Review-Url: https://codereview.chromium.org/2394313002
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index 6e8f6711cd..1d4b36efd7 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -1012,13 +1012,10 @@ FX_BOOL CPDFXFA_DocEnvironment::GetGlobalProperty( !m_pDocument->GetSDKDoc()->GetEnv()->GetJSRuntime()) return FALSE; - if (!m_pJSContext) { - m_pDocument->GetSDKDoc()->GetEnv()->GetJSRuntime()->SetReaderDocument( - m_pDocument->GetSDKDoc()); - m_pJSContext = - m_pDocument->GetSDKDoc()->GetEnv()->GetJSRuntime()->NewContext(); - } + CPDFSDK_FormFillEnvironment* pFormFillEnv = + m_pDocument->GetSDKDoc()->GetEnv(); + if (!m_pJSContext) + m_pJSContext = pFormFillEnv->GetJSRuntime()->NewContext(); - return m_pDocument->GetSDKDoc()->GetEnv()->GetJSRuntime()->GetValueByName( - szPropName, pValue); + return pFormFillEnv->GetJSRuntime()->GetValueByName(szPropName, pValue); } |