summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-23 11:10:54 -0700
committerLei Zhang <thestig@chromium.org>2015-09-23 11:10:54 -0700
commit860a3eb0f3c18853f95df5a70dc50a95a29aafb1 (patch)
tree72209613e6c5fabc9d4e87a861d865c6ea7f6005
parent880f927216c2f0666f69155da0ffc732747fafb8 (diff)
downloadpdfium-chromium/2454.tar.xz
Merge to M45: Fix JS_GetArrayElement to not return an empty handle on successchromium/2454
BUG=chromium:528376 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1337433002 . (cherry picked from commit 0d0935d3d6603dd7d851b1d5828635230f4c43ca) Review URL: https://codereview.chromium.org/1364833002 .
-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 7adfc2696d..af0000343a 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -635,7 +635,7 @@ v8::Local<v8::Value> JS_GetArrayElement(IJS_Runtime* pJSRuntime, v8::Local<v8::A
{
if(pArray.IsEmpty()) return v8::Local<v8::Value>();
v8::Local<v8::Value> val;
- if (pArray->Get(pJSRuntime->GetCurrentContext(), index).ToLocal(&val)) return v8::Local<v8::Value>();
+ if (!pArray->Get(pJSRuntime->GetCurrentContext(), index).ToLocal(&val)) return v8::Local<v8::Value>();
return val;
}