From 3cac3602f24f56413cc2ca312731675fc080b7ef Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 24 Oct 2017 15:15:27 -0400 Subject: 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 Commit-Queue: dsinclair --- fpdfsdk/javascript/util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/javascript/util.cpp') diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index 96b2c8a6ef..28ab0bb95c 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -162,7 +162,7 @@ bool util::printd(CJS_Runtime* pRuntime, return false; } - if (p1.GetType() == CJS_Value::VT_number) { + if (p1.ToV8Value()->IsNumber()) { WideString swResult; switch (pRuntime->ToInt32(p1.ToV8Value())) { case 0: @@ -194,7 +194,7 @@ bool util::printd(CJS_Runtime* pRuntime, return true; } - if (p1.GetType() == CJS_Value::VT_string) { + if (p1.ToV8Value()->IsString()) { if (iSize > 2 && pRuntime->ToBoolean(params[2].ToV8Value())) { sError = JSGetStringFromID(IDS_STRING_JSNOTSUPPORT); return false; // currently, it doesn't support XFAPicture. -- cgit v1.2.3