diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-24 15:15:27 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-24 19:28:02 +0000 |
commit | 3cac3602f24f56413cc2ca312731675fc080b7ef (patch) | |
tree | cc5741593ce51f41276be2f8a1826bf452a7841c /fpdfsdk/javascript/PublicMethods.cpp | |
parent | 1b2a18ec4ed99fc2ac56b5fde230bc2b348d9725 (diff) | |
download | pdfium-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/PublicMethods.cpp')
-rw-r--r-- | fpdfsdk/javascript/PublicMethods.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp index 462398012d..68fc30572b 100644 --- a/fpdfsdk/javascript/PublicMethods.cpp +++ b/fpdfsdk/javascript/PublicMethods.cpp @@ -1660,7 +1660,7 @@ bool CJS_PublicMethods::AFMakeNumber(CJS_Runtime* pRuntime, ws.Replace(L",", L"."); vRet = CJS_Value(pRuntime->NewString(ws.c_str())); vRet.MaybeCoerceToNumber(pRuntime); - if (vRet.GetType() != CJS_Value::VT_number) + if (!vRet.ToV8Value()->IsNumber()) vRet = CJS_Value(pRuntime->NewNumber(0)); return true; } @@ -1675,7 +1675,7 @@ bool CJS_PublicMethods::AFSimple_Calculate(CJS_Runtime* pRuntime, } CJS_Value params1(params[1]); - if (!params1.IsArrayObject() && params1.GetType() != CJS_Value::VT_string) { + if (!params1.IsArrayObject() && !params1.ToV8Value()->IsString()) { sError = JSGetStringFromID(IDS_STRING_JSPARAMERROR); return false; } |