summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Field.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-24 15:15:27 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-24 19:28:02 +0000
commit3cac3602f24f56413cc2ca312731675fc080b7ef (patch)
treecc5741593ce51f41276be2f8a1826bf452a7841c /fpdfsdk/javascript/Field.cpp
parent1b2a18ec4ed99fc2ac56b5fde230bc2b348d9725 (diff)
downloadpdfium-3cac3602f24f56413cc2ca312731675fc080b7ef.tar.xz
Remove GetType from CJS_Value
This CL removes the GetType method from CJS_Value and, instead, retrieves the value from the v8 object directly. Change-Id: Ia8390f3ead163c09a39cae493e75fccdd41a0961 Reviewed-on: https://pdfium-review.googlesource.com/16615 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/Field.cpp')
-rw-r--r--fpdfsdk/javascript/Field.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 5bcc66b7e9..0ed0594b3b 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -877,7 +877,7 @@ bool Field::set_current_value_indices(CJS_Runtime* pRuntime,
return false;
std::vector<uint32_t> array;
- if (vp.GetType() == CJS_Value::VT_number) {
+ if (vp.ToV8Value()->IsNumber()) {
array.push_back(pRuntime->ToInt32(vp.ToV8Value()));
} else if (vp.IsArrayObject()) {
CJS_Array SelArray(pRuntime->ToArray(vp.ToV8Value()));