diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-02-16 11:49:55 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-16 20:23:48 +0000 |
commit | d6ae2afa821c87e84790d5c04bbc172a7b12f08f (patch) | |
tree | 10beb72deaffca61ccc54a3fb49ea0d9636579bb /fpdfsdk/fpdfxfa | |
parent | 49f7deb494064351c72ef4d31577e04f634e63f3 (diff) | |
download | pdfium-d6ae2afa821c87e84790d5c04bbc172a7b12f08f.tar.xz |
Rename IJS_Context to IJS_EventContext.
Prevents confusion with v8::Context, which is wrapped by a
different IJS_ class.
Change-Id: Iff75809e65015c0f810294de1f0d8ecf963150a3
Reviewed-on: https://pdfium-review.googlesource.com/2751
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.h | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 12 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h | 6 |
3 files changed, 11 insertions, 9 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h index e1c357fde9..9a2a517fb5 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h @@ -17,8 +17,8 @@ class CJS_Runtime; class CPDFSDK_FormFillEnvironment; class CPDFXFA_Page; class CXFA_FFDocHandler; +class IJS_EventContext; class IJS_Runtime; -class IJS_Context; enum LoadStatus { FXFA_LOADSTATUS_PRELOAD = 0, diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index ec62927324..962dbbae09 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -38,13 +38,15 @@ #define FXFA_XFA_ALL 0x01111111 CPDFXFA_DocEnvironment::CPDFXFA_DocEnvironment(CPDFXFA_Context* pContext) - : m_pContext(pContext), m_pJSContext(nullptr) { + : m_pContext(pContext), m_pJSEventContext(nullptr) { ASSERT(m_pContext); } CPDFXFA_DocEnvironment::~CPDFXFA_DocEnvironment() { - if (m_pJSContext && m_pContext->GetFormFillEnv()) - m_pContext->GetFormFillEnv()->GetJSRuntime()->ReleaseContext(m_pJSContext); + if (m_pJSEventContext && m_pContext->GetFormFillEnv()) { + m_pContext->GetFormFillEnv()->GetJSRuntime()->ReleaseEventContext( + m_pJSEventContext); + } } void CPDFXFA_DocEnvironment::SetChangeMark(CXFA_FFDoc* hDoc) { @@ -1023,8 +1025,8 @@ bool CPDFXFA_DocEnvironment::GetGlobalProperty( } CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv(); - if (!m_pJSContext) - m_pJSContext = pFormFillEnv->GetJSRuntime()->NewContext(); + if (!m_pJSEventContext) + m_pJSEventContext = pFormFillEnv->GetJSRuntime()->NewEventContext(); return pFormFillEnv->GetJSRuntime()->GetValueByName(szPropName, pValue); } diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h index d7cb169616..dc18d9a0c6 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h @@ -12,7 +12,7 @@ #include "xfa/fxfa/fxfa.h" class CPDFXFA_Context; -class IJS_Context; +class IJS_EventContext; class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment { public: @@ -107,8 +107,8 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment { FPDF_DWORD flag); void ToXFAContentFlags(CFX_WideString csSrcContent, FPDF_DWORD& flag); - CPDFXFA_Context* const m_pContext; // Not owned; - IJS_Context* m_pJSContext; + CPDFXFA_Context* const m_pContext; // Not owned. + IJS_EventContext* m_pJSEventContext; // Not owned. }; #endif // FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_ |