summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/app.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-13 15:40:18 -0700
committerLei Zhang <thestig@chromium.org>2015-08-13 15:40:18 -0700
commite00660b5fa41956db06c557807b68a1117d1b70b (patch)
treee3c0bd280a2ee1d3a978d55db259724327281e21 /fpdfsdk/src/javascript/app.cpp
parent0434f5b8ec8de0e89714f301826e9e3bbf617fbf (diff)
downloadpdfium-e00660b5fa41956db06c557807b68a1117d1b70b.tar.xz
Merge to XFA: Remove if checks after new.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1287863002 . (cherry picked from commit 388a3b0b8d6f75d47978c08299300f121f04884c) Review URL: https://codereview.chromium.org/1292653002 .
Diffstat (limited to 'fpdfsdk/src/javascript/app.cpp')
-rw-r--r--fpdfsdk/src/javascript/app.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index 136b544142..aff491a084 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -304,19 +304,12 @@ FX_BOOL app::alert(IFXJS_Context* cc,
if (swMsg == L"") {
CJS_Array carray(isolate);
if (params[0].ConvertToArray(carray)) {
- int iLenth = carray.GetLength();
+ int iLength = carray.GetLength();
CJS_Value* pValue = new CJS_Value(isolate);
- // if (iLenth == 1)
- // pValue = new
- // CJS_Value(isolate);
- // else if (iLenth > 1)
- // pValue = new
- // CJS_Value[iLenth];
-
- for (int i = 0; i < iLenth; i++) {
+ for (int i = 0; i < iLength; ++i) {
carray.GetElement(i, *pValue);
swMsg += (*pValue).ToCFXWideString();
- if (i < iLenth - 1)
+ if (i < iLength - 1)
swMsg += L", ";
}