summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Annot.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-24 13:56:29 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-24 18:08:51 +0000
commit1b2a18ec4ed99fc2ac56b5fde230bc2b348d9725 (patch)
treea529fbb941a15197b050a0aa88e7a9403ff56152 /fpdfsdk/javascript/Annot.cpp
parent65f3162c91607071322967ea064a4a11e3904722 (diff)
downloadpdfium-1b2a18ec4ed99fc2ac56b5fde230bc2b348d9725.tar.xz
Remove the CJS_Value To* methods.
This CL removes all of the To* methods on the CJS classes except for ToV8Value. Change-Id: If01263c8cfa557ef7b00f573ddbf68b591d5ae9a Reviewed-on: https://pdfium-review.googlesource.com/16614 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/Annot.cpp')
-rw-r--r--fpdfsdk/javascript/Annot.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/Annot.cpp b/fpdfsdk/javascript/Annot.cpp
index c9fbaaf76f..d80c75525a 100644
--- a/fpdfsdk/javascript/Annot.cpp
+++ b/fpdfsdk/javascript/Annot.cpp
@@ -52,7 +52,8 @@ bool Annot::get_hidden(CJS_Runtime* pRuntime,
bool Annot::set_hidden(CJS_Runtime* pRuntime,
const CJS_Value& vp,
WideString* sError) {
- bool bHidden = vp.ToBool(pRuntime); // May invalidate m_pAnnot.
+ // May invalidate m_pAnnot.
+ bool bHidden = pRuntime->ToBoolean(vp.ToV8Value());
if (!m_pAnnot) {
*sError = JSGetStringFromID(IDS_STRING_JSBADOBJECT);
return false;
@@ -89,7 +90,8 @@ bool Annot::get_name(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError) {
bool Annot::set_name(CJS_Runtime* pRuntime,
const CJS_Value& vp,
WideString* sError) {
- WideString annotName = vp.ToWideString(pRuntime); // May invalidate m_pAnnot.
+ // May invalidate m_pAnnot.
+ WideString annotName = pRuntime->ToWideString(vp.ToV8Value());
if (!m_pAnnot) {
*sError = JSGetStringFromID(IDS_STRING_JSBADOBJECT);
return false;