From 0d0935d3d6603dd7d851b1d5828635230f4c43ca Mon Sep 17 00:00:00 2001 From: Jochen Eisinger Date: Thu, 10 Sep 2015 13:44:04 +0200 Subject: Fix JS_GetArrayElement to not return an empty handle on success BUG=chromium:528376 R=ulan@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1337433002 . --- fpdfsdk/src/jsapi/fxjs_v8.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 JS_GetArrayElement(IJS_Runtime* pJSRuntime, if (pArray.IsEmpty()) return v8::Local(); v8::Local val; - if (pArray->Get(pJSRuntime->GetCurrentContext(), index).ToLocal(&val)) + if (!pArray->Get(pJSRuntime->GetCurrentContext(), index).ToLocal(&val)) return v8::Local(); return val; } -- cgit v1.2.3