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/util.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/util.cpp')
-rw-r--r-- | fpdfsdk/javascript/util.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index 3967ceb0cb..0baca534b4 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -18,7 +18,7 @@ #include "fpdfsdk/javascript/JS_Object.h" #include "fpdfsdk/javascript/JS_Value.h" #include "fpdfsdk/javascript/PublicMethods.h" -#include "fpdfsdk/javascript/cjs_context.h" +#include "fpdfsdk/javascript/cjs_event_context.h" #include "fpdfsdk/javascript/cjs_runtime.h" #include "fpdfsdk/javascript/resource.h" @@ -114,11 +114,11 @@ util::util(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {} util::~util() {} -bool util::printf(IJS_Context* cc, +bool util::printf(IJS_EventContext* cc, const std::vector<CJS_Value>& params, CJS_Value& vRet, CFX_WideString& sError) { - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); int iSize = params.size(); if (iSize < 1) return false; @@ -177,7 +177,7 @@ bool util::printf(IJS_Context* cc, return true; } -bool util::printd(IJS_Context* cc, +bool util::printd(IJS_EventContext* cc, const std::vector<CJS_Value>& params, CJS_Value& vRet, CFX_WideString& sError) { @@ -185,7 +185,7 @@ bool util::printd(IJS_Context* cc, if (iSize < 2) return false; - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); CJS_Value p1 = params[0]; CJS_Value p2 = params[1]; CJS_Date jsDate; @@ -307,7 +307,7 @@ bool util::printd(IJS_Context* cc, return false; } -bool util::printx(IJS_Context* cc, +bool util::printx(IJS_EventContext* cc, const std::vector<CJS_Value>& params, CJS_Value& vRet, CFX_WideString& sError) { @@ -316,7 +316,7 @@ bool util::printx(IJS_Context* cc, return false; } - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); vRet = CJS_Value(pRuntime, printx(params[0].ToCFXWideString(pRuntime), params[1].ToCFXWideString(pRuntime)) .c_str()); @@ -425,11 +425,11 @@ CFX_WideString util::printx(const CFX_WideString& wsFormat, return wsResult; } -bool util::scand(IJS_Context* cc, +bool util::scand(IJS_EventContext* cc, const std::vector<CJS_Value>& params, CJS_Value& vRet, CFX_WideString& sError) { - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); int iSize = params.size(); if (iSize < 2) return false; @@ -450,7 +450,7 @@ bool util::scand(IJS_Context* cc, return true; } -bool util::byteToChar(IJS_Context* cc, +bool util::byteToChar(IJS_EventContext* cc, const std::vector<CJS_Value>& params, CJS_Value& vRet, CFX_WideString& sError) { @@ -459,7 +459,7 @@ bool util::byteToChar(IJS_Context* cc, return false; } - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); int arg = params[0].ToInt(pRuntime); if (arg < 0 || arg > 255) { sError = JSGetStringFromID(IDS_STRING_JSVALUEERROR); |