summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/event.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/event.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/event.cpp')
-rw-r--r--fpdfsdk/javascript/event.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/javascript/event.cpp b/fpdfsdk/javascript/event.cpp
index 361afa8cff..337ce40cd8 100644
--- a/fpdfsdk/javascript/event.cpp
+++ b/fpdfsdk/javascript/event.cpp
@@ -63,7 +63,7 @@ bool event::set_change(CJS_Runtime* pRuntime,
if (vp.GetType() == CJS_Value::VT_string) {
WideString& wChange = pEvent->Change();
- wChange = vp.ToWideString(pRuntime);
+ wChange = pRuntime->ToWideString(vp.ToV8Value());
}
return true;
}
@@ -174,7 +174,7 @@ bool event::set_rc(CJS_Runtime* pRuntime,
WideString* sError) {
CJS_EventHandler* pEvent =
pRuntime->GetCurrentEventContext()->GetEventHandler();
- pEvent->Rc() = vp.ToBool(pRuntime);
+ pEvent->Rc() = pRuntime->ToBoolean(vp.ToV8Value());
return true;
}
@@ -236,7 +236,7 @@ bool event::set_sel_end(CJS_Runtime* pRuntime,
if (wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0)
return true;
- pEvent->SelEnd() = vp.ToInt(pRuntime);
+ pEvent->SelEnd() = pRuntime->ToInt32(vp.ToV8Value());
return true;
}
@@ -262,7 +262,7 @@ bool event::set_sel_start(CJS_Runtime* pRuntime,
if (wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0)
return true;
- pEvent->SelStart() = vp.ToInt(pRuntime);
+ pEvent->SelStart() = pRuntime->ToInt32(vp.ToV8Value());
return true;
}
@@ -367,7 +367,7 @@ bool event::set_value(CJS_Runtime* pRuntime,
if (!pEvent->m_pValue)
return false;
- pEvent->Value() = vp.ToWideString(pRuntime);
+ pEvent->Value() = pRuntime->ToWideString(vp.ToV8Value());
return true;
}