summaryrefslogtreecommitdiff
path: root/fxjs/cjs_annot.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-17 19:28:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-17 19:28:52 +0000
commit3a6d058740a9908a06efb9e9362df01acdee6ff8 (patch)
tree9bc645b0cb3442749458fc63e2feb04c0cb813ef /fxjs/cjs_annot.cpp
parent0a2328e0eff7a11aa49b7da8f013e658153a7b1a (diff)
downloadpdfium-3a6d058740a9908a06efb9e9362df01acdee6ff8.tar.xz
Rename CJS_Return to CJS_Result.
"Return" is a verb, and "return" is a reserved-word at that, so avoid using it as part of a class name. Fully mechanical change apart from rename. Change-Id: I120e453e8ba001c4ab74a39e2da6aa6eb590835f Reviewed-on: https://pdfium-review.googlesource.com/40532 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_annot.cpp')
-rw-r--r--fxjs/cjs_annot.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/fxjs/cjs_annot.cpp b/fxjs/cjs_annot.cpp
index 4e93dc2516..dda52f629c 100644
--- a/fxjs/cjs_annot.cpp
+++ b/fxjs/cjs_annot.cpp
@@ -37,23 +37,23 @@ CJS_Annot::CJS_Annot(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
CJS_Annot::~CJS_Annot() = default;
-CJS_Return CJS_Annot::get_hidden(CJS_Runtime* pRuntime) {
+CJS_Result CJS_Annot::get_hidden(CJS_Runtime* pRuntime) {
if (!m_pAnnot)
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
CPDF_Annot* pPDFAnnot = m_pAnnot->AsBAAnnot()->GetPDFAnnot();
- return CJS_Return::Success(pRuntime->NewBoolean(
+ return CJS_Result::Success(pRuntime->NewBoolean(
CPDF_Annot::IsAnnotationHidden(pPDFAnnot->GetAnnotDict())));
}
-CJS_Return CJS_Annot::set_hidden(CJS_Runtime* pRuntime,
+CJS_Result CJS_Annot::set_hidden(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) {
// May invalidate m_pAnnot.
bool bHidden = pRuntime->ToBoolean(vp);
CPDFSDK_BAAnnot* pBAAnnot = ToBAAnnot(m_pAnnot.Get());
if (!pBAAnnot)
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
uint32_t flags = pBAAnnot->GetFlags();
if (bHidden) {
@@ -68,42 +68,42 @@ CJS_Return CJS_Annot::set_hidden(CJS_Runtime* pRuntime,
flags |= ANNOTFLAG_PRINT;
}
pBAAnnot->SetFlags(flags);
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_Annot::get_name(CJS_Runtime* pRuntime) {
+CJS_Result CJS_Annot::get_name(CJS_Runtime* pRuntime) {
CPDFSDK_BAAnnot* pBAAnnot = ToBAAnnot(m_pAnnot.Get());
if (!pBAAnnot)
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
- return CJS_Return::Success(
+ return CJS_Result::Success(
pRuntime->NewString(pBAAnnot->GetAnnotName().AsStringView()));
}
-CJS_Return CJS_Annot::set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
+CJS_Result CJS_Annot::set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
// May invalidate m_pAnnot.
WideString annotName = pRuntime->ToWideString(vp);
CPDFSDK_BAAnnot* pBAAnnot = ToBAAnnot(m_pAnnot.Get());
if (!pBAAnnot)
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
pBAAnnot->SetAnnotName(annotName);
- return CJS_Return::Success();
+ return CJS_Result::Success();
}
-CJS_Return CJS_Annot::get_type(CJS_Runtime* pRuntime) {
+CJS_Result CJS_Annot::get_type(CJS_Runtime* pRuntime) {
CPDFSDK_BAAnnot* pBAAnnot = ToBAAnnot(m_pAnnot.Get());
if (!pBAAnnot)
- return CJS_Return::Failure(JSMessage::kBadObjectError);
+ return CJS_Result::Failure(JSMessage::kBadObjectError);
- return CJS_Return::Success(pRuntime->NewString(
+ return CJS_Result::Success(pRuntime->NewString(
WideString::FromLocal(
CPDF_Annot::AnnotSubtypeToString(pBAAnnot->GetAnnotSubtype())
.AsStringView())
.AsStringView()));
}
-CJS_Return CJS_Annot::set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
- return CJS_Return::Failure(JSMessage::kReadOnlyError);
+CJS_Result CJS_Annot::set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
+ return CJS_Result::Failure(JSMessage::kReadOnlyError);
}