diff options
author | Jochen Eisinger <jochen@chromium.org> | 2015-09-10 13:44:04 +0200 |
---|---|---|
committer | Jochen Eisinger <jochen@chromium.org> | 2015-09-10 13:44:04 +0200 |
commit | 0d0935d3d6603dd7d851b1d5828635230f4c43ca (patch) | |
tree | 6f5d591ae811e96ac85f463a83267341efcd722e /fpdfsdk/src/jsapi | |
parent | 4ea0e6b972b0c6f6c9ad3f45a66a733d8dc3ca96 (diff) | |
download | pdfium-0d0935d3d6603dd7d851b1d5828635230f4c43ca.tar.xz |
Fix JS_GetArrayElement to not return an empty handle on successchromium/2507
BUG=chromium:528376
R=ulan@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1337433002 .
Diffstat (limited to 'fpdfsdk/src/jsapi')
-rw-r--r-- | fpdfsdk/src/jsapi/fxjs_v8.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp index f2f2e55898..1dd479aec6 100644 --- a/fpdfsdk/src/jsapi/fxjs_v8.cpp +++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp @@ -743,7 +743,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; } |