summaryrefslogtreecommitdiff
path: root/fxjs/cjs_app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_app.cpp')
-rw-r--r--fxjs/cjs_app.cpp222
1 files changed, 111 insertions, 111 deletions
diff --git a/fxjs/cjs_app.cpp b/fxjs/cjs_app.cpp
index bd57e05b8b..12bb8ddc84 100644
--- a/fxjs/cjs_app.cpp
+++ b/fxjs/cjs_app.cpp
@@ -101,7 +101,7 @@ CJS_App::CJS_App(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
CJS_App::~CJS_App() = default;
-CJS_Return CJS_App::get_active_docs(CJS_Runtime* pRuntime) {
+CJS_Result CJS_App::get_active_docs(CJS_Runtime* pRuntime) {
v8::Local<v8::Object> pObj = pRuntime->GetThisObj();
auto pJSDocument = JSGetObject<CJS_Document>(pObj);
v8::Local<v8::Array> aDocs = pRuntime->NewArray();
@@ -110,111 +110,111 @@ CJS_Return CJS_App::get_active_docs(CJS_Runtime* pRuntime) {
pJSDocument ? v8::Local<v8::Value>(pJSDocument->ToV8Object())
: v8::Local<v8::Value>());
if (pRuntime->GetArrayLength(aDocs) > 0)
- return CJS_Return::Success(aDocs);
+ return CJS_Result::Success(aDocs);
- return CJS_Return::Success(pRuntime->NewUndefined());
+ return CJS_Result::Success(pRuntime->NewUndefined());
}
-CJS_Return CJS_App::set_active_docs(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_active_docs(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::get_calculate(CJS_Runtime* pRuntime) {
- return CJS_Return::Success(pRuntime->NewBoolean(m_bCalculate));
+CJS_Result CJS_App::get_calculate(CJS_Runtime* pRuntime) {
+ return CJS_Result::Success(pRuntime->NewBoolean(m_bCalculate));
}
-CJS_Return CJS_App::set_calculate(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_calculate(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
m_bCalculate = pRuntime->ToBoolean(vp);
pRuntime->GetFormFillEnv()->GetInterForm()->EnableCalculate(m_bCalculate);
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::get_forms_version(CJS_Runtime* pRuntime) {
- return CJS_Return::Success(pRuntime->NewNumber(JS_NUM_FORMSVERSION));
+CJS_Result CJS_App::get_forms_version(CJS_Runtime* pRuntime) {
+ return CJS_Result::Success(pRuntime->NewNumber(JS_NUM_FORMSVERSION));
}
-CJS_Return CJS_App::set_forms_version(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_forms_version(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::get_viewer_type(CJS_Runtime* pRuntime) {
- return CJS_Return::Success(pRuntime->NewString(JS_STR_VIEWERTYPE));
+CJS_Result CJS_App::get_viewer_type(CJS_Runtime* pRuntime) {
+ return CJS_Result::Success(pRuntime->NewString(JS_STR_VIEWERTYPE));
}
-CJS_Return CJS_App::set_viewer_type(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_viewer_type(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::get_viewer_variation(CJS_Runtime* pRuntime) {
- return CJS_Return::Success(pRuntime->NewString(JS_STR_VIEWERVARIATION));
+CJS_Result CJS_App::get_viewer_variation(CJS_Runtime* pRuntime) {
+ return CJS_Result::Success(pRuntime->NewString(JS_STR_VIEWERVARIATION));
}
-CJS_Return CJS_App::set_viewer_variation(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_viewer_variation(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::get_viewer_version(CJS_Runtime* pRuntime) {
+CJS_Result CJS_App::get_viewer_version(CJS_Runtime* pRuntime) {
#ifdef PDF_ENABLE_XFA
CPDFXFA_Context* pXFAContext = pRuntime->GetFormFillEnv()->GetXFAContext();
if (pXFAContext->ContainsXFAForm())
- return CJS_Return::Success(pRuntime->NewNumber(JS_NUM_VIEWERVERSION_XFA));
+ return CJS_Result::Success(pRuntime->NewNumber(JS_NUM_VIEWERVERSION_XFA));
#endif // PDF_ENABLE_XFA
- return CJS_Return::Success(pRuntime->NewNumber(JS_NUM_VIEWERVERSION));
+ return CJS_Result::Success(pRuntime->NewNumber(JS_NUM_VIEWERVERSION));
}
-CJS_Return CJS_App::set_viewer_version(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_viewer_version(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::get_platform(CJS_Runtime* pRuntime) {
+CJS_Result CJS_App::get_platform(CJS_Runtime* pRuntime) {
#ifdef PDF_ENABLE_XFA
CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv();
if (!pFormFillEnv)
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
WideString platform = pFormFillEnv->GetPlatform();
if (!platform.IsEmpty())
- return CJS_Return::Success(pRuntime->NewString(platform.AsStringView()));
+ return CJS_Result::Success(pRuntime->NewString(platform.AsStringView()));
#endif
- return CJS_Return::Success(pRuntime->NewString(JS_STR_PLATFORM));
+ return CJS_Result::Success(pRuntime->NewString(JS_STR_PLATFORM));
}
-CJS_Return CJS_App::set_platform(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_platform(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::get_language(CJS_Runtime* pRuntime) {
+CJS_Result CJS_App::get_language(CJS_Runtime* pRuntime) {
#ifdef PDF_ENABLE_XFA
CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv();
if (!pFormFillEnv)
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
WideString language = pFormFillEnv->GetLanguage();
if (!language.IsEmpty())
- return CJS_Return::Success(pRuntime->NewString(language.AsStringView()));
+ return CJS_Result::Success(pRuntime->NewString(language.AsStringView()));
#endif
- return CJS_Return::Success(pRuntime->NewString(JS_STR_LANGUAGE));
+ return CJS_Result::Success(pRuntime->NewString(JS_STR_LANGUAGE));
}
-CJS_Return CJS_App::set_language(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_language(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
// creates a new fdf object that contains no data
// comment: need reader support
// note:
// CFDF_Document * CPDFSDK_FormFillEnvironment::NewFDF();
-CJS_Return CJS_App::newFDF(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::newFDF(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
// opens a specified pdf document and returns its document object
@@ -224,22 +224,22 @@ CJS_Return CJS_App::newFDF(CJS_Runtime* pRuntime,
// CFDF_Document * CPDFSDK_FormFillEnvironment::OpenFDF(string strPath,bool
// bUserConv);
-CJS_Return CJS_App::openFDF(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::openFDF(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::alert(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::alert(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
std::vector<v8::Local<v8::Value>> newParams = ExpandKeywordParams(
pRuntime, params, 4, L"cMsg", L"nIcon", L"nType", L"cTitle");
if (!IsTypeKnown(newParams[0]))
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv();
if (!pFormFillEnv)
- return CJS_Return::Success(pRuntime->NewNumber(0));
+ return CJS_Result::Success(pRuntime->NewNumber(0));
WideString swMsg;
if (newParams[0]->IsArray()) {
@@ -276,51 +276,51 @@ CJS_Return CJS_App::alert(CJS_Runtime* pRuntime,
pFormFillEnv->JS_appAlert(swMsg, swTitle, iType, iIcon));
pRuntime->EndBlock();
- return CJS_Return::Success(ret);
+ return CJS_Result::Success(ret);
}
-CJS_Return CJS_App::beep(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::beep(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
if (params.size() != 1)
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
int type = JSPLATFORM_BEEP_DEFAULT;
if (IsTypeKnown(params[0]))
type = pRuntime->ToInt32(params[0]);
pRuntime->GetFormFillEnv()->JS_appBeep(type);
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::findComponent(
+CJS_Result CJS_App::findComponent(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::popUpMenuEx(
+CJS_Result CJS_App::popUpMenuEx(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::get_fs(CJS_Runtime* pRuntime) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+CJS_Result CJS_App::get_fs(CJS_Runtime* pRuntime) {
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::set_fs(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+CJS_Result CJS_App::set_fs(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::setInterval(
+CJS_Result CJS_App::setInterval(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
if (params.size() == 0 || params.size() > 2)
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
WideString script = pRuntime->ToWideString(params[0]);
if (script.IsEmpty())
- return CJS_Return::Failure(JSMessage::kInvalidInputError);
+ return CJS_Result::Failure(JSMessage::kInvalidInputError);
uint32_t dwInterval = params.size() > 1 ? pRuntime->ToInt32(params[1]) : 1000;
auto timerRef = pdfium::MakeUnique<GlobalTimer>(
@@ -331,24 +331,24 @@ CJS_Return CJS_App::setInterval(
v8::Local<v8::Object> pRetObj = pRuntime->NewFXJSBoundObject(
CJS_TimerObj::GetObjDefnID(), FXJSOBJTYPE_DYNAMIC);
if (pRetObj.IsEmpty())
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
auto* pJS_TimerObj =
static_cast<CJS_TimerObj*>(CFXJS_Engine::GetObjectPrivate(pRetObj));
pJS_TimerObj->SetTimer(pTimerRef);
- return CJS_Return::Success(pRetObj);
+ return CJS_Result::Success(pRetObj);
}
-CJS_Return CJS_App::setTimeOut(
+CJS_Result CJS_App::setTimeOut(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
if (params.size() == 0 || params.size() > 2)
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
WideString script = pRuntime->ToWideString(params[0]);
if (script.IsEmpty())
- return CJS_Return::Failure(JSMessage::kInvalidInputError);
+ return CJS_Result::Failure(JSMessage::kInvalidInputError);
uint32_t dwTimeOut = params.size() > 1 ? pRuntime->ToInt32(params[1]) : 1000;
auto timerRef = pdfium::MakeUnique<GlobalTimer>(
@@ -360,33 +360,33 @@ CJS_Return CJS_App::setTimeOut(
v8::Local<v8::Object> pRetObj = pRuntime->NewFXJSBoundObject(
CJS_TimerObj::GetObjDefnID(), FXJSOBJTYPE_DYNAMIC);
if (pRetObj.IsEmpty())
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
auto* pJS_TimerObj =
static_cast<CJS_TimerObj*>(CFXJS_Engine::GetObjectPrivate(pRetObj));
pJS_TimerObj->SetTimer(pTimerRef);
- return CJS_Return::Success(pRetObj);
+ return CJS_Result::Success(pRetObj);
}
-CJS_Return CJS_App::clearTimeOut(
+CJS_Result CJS_App::clearTimeOut(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
if (params.size() != 1)
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
CJS_App::ClearTimerCommon(pRuntime, params[0]);
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::clearInterval(
+CJS_Result CJS_App::clearInterval(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
if (params.size() != 1)
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
CJS_App::ClearTimerCommon(pRuntime, params[0]);
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
void CJS_App::ClearTimerCommon(CJS_Runtime* pRuntime,
@@ -402,7 +402,7 @@ void CJS_App::ClearTimerCommon(CJS_Runtime* pRuntime,
GlobalTimer::Cancel(pTimer->GetTimerID());
}
-CJS_Return CJS_App::execMenuItem(
+CJS_Result CJS_App::execMenuItem(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
if (params.size() > 0 && IsTypeKnown(params[0])) {
@@ -411,7 +411,7 @@ CJS_Return CJS_App::execMenuItem(
pRuntime->GetFormFillEnv()->SaveCalled();
}
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
void CJS_App::TimerProc(GlobalTimer* pTimer) {
@@ -433,26 +433,26 @@ void CJS_App::RunJsScript(CJS_Runtime* pRuntime, const WideString& wsScript) {
pContext->RunScript(wsScript);
}
-CJS_Return CJS_App::goBack(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::goBack(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
// Not supported, but do not return error.
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::goForward(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::goForward(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
// Not supported, but do not return error.
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::mailMsg(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::mailMsg(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
std::vector<v8::Local<v8::Value>> newParams =
ExpandKeywordParams(pRuntime, params, 6, L"bUI", L"cTo", L"cCc", L"cBcc",
L"cSubject", L"cMsg");
if (!IsTypeKnown(newParams[0]))
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
bool bUI = pRuntime->ToBoolean(newParams[0]);
WideString cTo;
@@ -461,7 +461,7 @@ CJS_Return CJS_App::mailMsg(CJS_Runtime* pRuntime,
} else {
// cTo parameter required when UI not invoked.
if (!bUI)
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
}
WideString cCc;
@@ -484,44 +484,44 @@ CJS_Return CJS_App::mailMsg(CJS_Runtime* pRuntime,
pRuntime->GetFormFillEnv()->JS_docmailForm(nullptr, 0, bUI, cTo, cSubject,
cCc, cBcc, cMsg);
pRuntime->EndBlock();
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::launchURL(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::launchURL(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
// Unsafe, not supported, but do not return error.
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::get_runtime_highlight(CJS_Runtime* pRuntime) {
- return CJS_Return::Success(pRuntime->NewBoolean(m_bRuntimeHighLight));
+CJS_Result CJS_App::get_runtime_highlight(CJS_Runtime* pRuntime) {
+ return CJS_Result::Success(pRuntime->NewBoolean(m_bRuntimeHighLight));
}
-CJS_Return CJS_App::set_runtime_highlight(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_runtime_highlight(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
m_bRuntimeHighLight = pRuntime->ToBoolean(vp);
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_App::get_fullscreen(CJS_Runtime* pRuntime) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+CJS_Result CJS_App::get_fullscreen(CJS_Runtime* pRuntime) {
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::set_fullscreen(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::set_fullscreen(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::popUpMenu(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::popUpMenu(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::browseForDoc(
+CJS_Result CJS_App::browseForDoc(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
// Unsafe, not supported, but do not return an error.
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
WideString CJS_App::SysPathToPDFPath(const WideString& sOldPath) {
@@ -533,24 +533,24 @@ WideString CJS_App::SysPathToPDFPath(const WideString& sOldPath) {
return sRet;
}
-CJS_Return CJS_App::newDoc(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::newDoc(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::openDoc(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::openDoc(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::response(CJS_Runtime* pRuntime,
+CJS_Result CJS_App::response(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
std::vector<v8::Local<v8::Value>> newParams =
ExpandKeywordParams(pRuntime, params, 5, L"cQuestion", L"cTitle",
L"cDefault", L"bPassword", L"cLabel");
if (!IsTypeKnown(newParams[0]))
- return CJS_Return::Failure(JSMessage::kParamError);
+ return CJS_Result::Failure(JSMessage::kParamError);
WideString swQuestion = pRuntime->ToWideString(newParams[0]);
WideString swTitle = L"PDF";
@@ -576,24 +576,24 @@ CJS_Return CJS_App::response(CJS_Runtime* pRuntime,
MAX_INPUT_BYTES);
if (nLengthBytes < 0 || nLengthBytes > MAX_INPUT_BYTES)
- return CJS_Return::Failure(JSMessage::kParamTooLongError);
+ return CJS_Result::Failure(JSMessage::kParamTooLongError);
- return CJS_Return::Success(pRuntime->NewString(
+ return CJS_Result::Success(pRuntime->NewString(
WideString::FromUTF16LE(reinterpret_cast<uint16_t*>(pBuff.data()),
nLengthBytes / sizeof(uint16_t))
.AsStringView()));
}
-CJS_Return CJS_App::get_media(CJS_Runtime* pRuntime) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+CJS_Result CJS_App::get_media(CJS_Runtime* pRuntime) {
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::set_media(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kNotSupportedError);
+CJS_Result CJS_App::set_media(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
+ return CJS_Result::Failure(JSMessage::kNotSupportedError);
}
-CJS_Return CJS_App::execDialog(
+CJS_Result CJS_App::execDialog(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- return CJS_Return::Success();
+ return CJS_Result::Success();
}