diff options
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); |