summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Eisinger <jochen@chromium.org>2015-09-10 13:46:08 +0200
committerJochen Eisinger <jochen@chromium.org>2015-09-10 13:46:08 +0200
commitab54bc0f66ca3130ea4780580060f75f20c12234 (patch)
treedb3df32591209cd9f3da20b666b0c9ee3189f538
parent8b544ed88d6625d638dfd39dc5be87ce4a059a8d (diff)
downloadpdfium-ab54bc0f66ca3130ea4780580060f75f20c12234.tar.xz
Merge to XFA: Fix JS_GetArrayElement to not return an empty handle on success
BUG=chromium:528376 TBR=ulan@chromium.org, tsepez@chromium.org Original Review URL: https://codereview.chromium.org/1337433002 . (cherry picked from commit 0d0935d3d6603dd7d851b1d5828635230f4c43ca) Review URL: https://codereview.chromium.org/1334633004 .
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index de957ed456..28ebfa29ad 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -748,7 +748,7 @@ v8::Local<v8::Value> JS_GetArrayElement(IJS_Runtime* pJSRuntime,
if (pArray.IsEmpty())
return v8::Local<v8::Value>();
v8::Local<v8::Value> val;
- if (pArray->Get(pJSRuntime->GetCurrentContext(), index).ToLocal(&val))
+ if (!pArray->Get(pJSRuntime->GetCurrentContext(), index).ToLocal(&val))
return v8::Local<v8::Value>();
return val;
}