OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "fpdfsdk/javascript/JS_Value.h" | 7 #include "fpdfsdk/javascript/JS_Value.h" |
8 | 8 |
9 #include <time.h> | 9 #include <time.h> |
10 | 10 |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 | 886 |
887 if (originals.size() != 1 || originals[0].GetType() != CJS_Value::VT_object || | 887 if (originals.size() != 1 || originals[0].GetType() != CJS_Value::VT_object || |
888 originals[0].IsArrayObject()) { | 888 originals[0].IsArrayObject()) { |
889 return result; | 889 return result; |
890 } | 890 } |
891 v8::Local<v8::Object> pObj = originals[0].ToV8Object(); | 891 v8::Local<v8::Object> pObj = originals[0].ToV8Object(); |
892 result[0] = CJS_Value(pRuntime); // Make unknown. | 892 result[0] = CJS_Value(pRuntime); // Make unknown. |
893 | 893 |
894 va_list ap; | 894 va_list ap; |
895 va_start(ap, nKeywords); | 895 va_start(ap, nKeywords); |
896 for (int i = 0; i < nKeywords; ++i) { | 896 for (size_t i = 0; i < nKeywords; ++i) { |
897 const wchar_t* property = va_arg(ap, const wchar_t*); | 897 const wchar_t* property = va_arg(ap, const wchar_t*); |
898 v8::Local<v8::Value> v8Value = | 898 v8::Local<v8::Value> v8Value = |
899 FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); | 899 FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); |
900 if (!v8Value->IsUndefined()) | 900 if (!v8Value->IsUndefined()) |
901 result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); | 901 result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); |
902 } | 902 } |
903 va_end(ap); | 903 va_end(ap); |
904 return result; | 904 return result; |
905 } | 905 } |
OLD | NEW |