From d6ae2afa821c87e84790d5c04bbc172a7b12f08f Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 16 Feb 2017 11:49:55 -0800 Subject: 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 Reviewed-by: dsinclair --- fpdfsdk/javascript/global.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'fpdfsdk/javascript/global.cpp') diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp index aca86979ae..06b9d67f6a 100644 --- a/fpdfsdk/javascript/global.cpp +++ b/fpdfsdk/javascript/global.cpp @@ -14,7 +14,7 @@ #include "fpdfsdk/javascript/JS_GlobalData.h" #include "fpdfsdk/javascript/JS_Object.h" #include "fpdfsdk/javascript/JS_Value.h" -#include "fpdfsdk/javascript/cjs_context.h" +#include "fpdfsdk/javascript/cjs_event_context.h" #include "fpdfsdk/javascript/resource.h" BEGIN_JS_STATIC_CONST(CJS_Global) @@ -66,7 +66,7 @@ bool JSGlobalAlternate::QueryProperty(const FX_WCHAR* propname) { return CFX_WideString(propname) != L"setPersistent"; } -bool JSGlobalAlternate::DelProperty(IJS_Context* cc, +bool JSGlobalAlternate::DelProperty(IJS_EventContext* cc, const FX_WCHAR* propname, CFX_WideString& sError) { auto it = m_mapGlobal.find(CFX_ByteString::FromUnicode(propname)); @@ -77,11 +77,11 @@ bool JSGlobalAlternate::DelProperty(IJS_Context* cc, return true; } -bool JSGlobalAlternate::DoProperty(IJS_Context* cc, +bool JSGlobalAlternate::DoProperty(IJS_EventContext* cc, const FX_WCHAR* propname, CJS_PropValue& vp, CFX_WideString& sError) { - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); if (vp.IsSetting()) { CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname); switch (vp.GetJSValue()->GetType()) { @@ -157,7 +157,7 @@ bool JSGlobalAlternate::DoProperty(IJS_Context* cc, return false; } -bool JSGlobalAlternate::setPersistent(IJS_Context* cc, +bool JSGlobalAlternate::setPersistent(IJS_EventContext* cc, const std::vector& params, CJS_Value& vRet, CFX_WideString& sError) { @@ -166,7 +166,7 @@ bool JSGlobalAlternate::setPersistent(IJS_Context* cc, return false; } - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); auto it = m_mapGlobal.find(params[0].ToCFXByteString(pRuntime)); if (it != m_mapGlobal.end()) { JSGlobalData* pData = it->second; @@ -232,7 +232,7 @@ void JSGlobalAlternate::UpdateGlobalPersistentVariables() { } } -void JSGlobalAlternate::CommitGlobalPersisitentVariables(IJS_Context* cc) { +void JSGlobalAlternate::CommitGlobalPersisitentVariables(IJS_EventContext* cc) { for (auto it = m_mapGlobal.begin(); it != m_mapGlobal.end(); ++it) { CFX_ByteString name = it->first; JSGlobalData* pData = it->second; @@ -269,10 +269,10 @@ void JSGlobalAlternate::CommitGlobalPersisitentVariables(IJS_Context* cc) { } } -void JSGlobalAlternate::ObjectToArray(IJS_Context* cc, +void JSGlobalAlternate::ObjectToArray(IJS_EventContext* cc, v8::Local pObj, CJS_GlobalVariableArray& array) { - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); std::vector pKeyList = pRuntime->GetObjectPropertyNames(pObj); for (const auto& ws : pKeyList) { CFX_ByteString sKey = ws.UTF8Encode(); -- cgit v1.2.3