summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/PublicMethods.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-20 11:34:01 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-20 11:34:01 -0800
commitf13d510cf267c27f4c123494de67670ec201cedc (patch)
tree2b5e279bef4fb9eb4a3a7e963cae93c65bc80fba /fpdfsdk/src/javascript/PublicMethods.h
parentb196c7bebad66c9938d2705ccf64961bcdd774e2 (diff)
downloadpdfium-f13d510cf267c27f4c123494de67670ec201cedc.tar.xz
Bugs in CJS_PublicMethods::ParseNumber().
Fix the bugs by removing ParseNumber() entirely. For PDFium's JavaScript bindings, we want to get out of the numeric conversion business and inflict that on V8 as possible, avoiding platform-specific issue in strtod(). For other uses, there is a FX_atof() which is similarly buggy, but we can consolidate the use. Add an overloaded FX_atof() to handle wide strings more simply. BUG=pdfium:361 R=jochen@chromium.org Review URL: https://codereview.chromium.org/1586203006 .
Diffstat (limited to 'fpdfsdk/src/javascript/PublicMethods.h')
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/fpdfsdk/src/javascript/PublicMethods.h b/fpdfsdk/src/javascript/PublicMethods.h
index 013c4ce1a4..26640bc40b 100644
--- a/fpdfsdk/src/javascript/PublicMethods.h
+++ b/fpdfsdk/src/javascript/PublicMethods.h
@@ -144,18 +144,9 @@ class CJS_PublicMethods : public CJS_Object {
bool* bWrongFormat);
static CFX_WideString MakeFormatDate(double dDate,
const CFX_WideString& format);
- static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource,
- double& dRet,
- FX_BOOL& bDot);
- static double ParseStringToNumber(const FX_WCHAR* swSource);
static double ParseNormalDate(const CFX_WideString& value,
bool* bWrongFormat);
static double MakeInterDate(CFX_WideString strValue);
- static double ParseNumber(const FX_WCHAR* swSource,
- FX_BOOL& bAllDigits,
- FX_BOOL& bDot,
- FX_BOOL& bSign,
- FX_BOOL& bKXJS);
public:
static CFX_WideString StrLTrim(const FX_WCHAR* pStr);