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/javascript/global.cpp | |
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/javascript/global.cpp')
-rw-r--r-- | fpdfsdk/javascript/global.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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<CJS_Value>& 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<v8::Object> pObj, CJS_GlobalVariableArray& array) { - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); std::vector<CFX_WideString> pKeyList = pRuntime->GetObjectPropertyNames(pObj); for (const auto& ws : pKeyList) { CFX_ByteString sKey = ws.UTF8Encode(); |