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 .
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index de957ed..28ebfa2 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -748,7 +748,7 @@
   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;
 }