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/src/javascript/JS_Value.h" | 7 #include "fpdfsdk/src/javascript/JS_Value.h" |
8 | 8 |
9 #include <time.h> | 9 #include <time.h> |
| 10 |
10 #include <algorithm> | 11 #include <algorithm> |
11 #include <cmath> | 12 #include <cmath> |
12 #include <limits> | 13 #include <limits> |
| 14 #include <string> |
| 15 #include <vector> |
13 | 16 |
14 #include "fpdfsdk/src/javascript/Document.h" | 17 #include "fpdfsdk/src/javascript/Document.h" |
15 #include "fpdfsdk/src/javascript/JS_Define.h" | 18 #include "fpdfsdk/src/javascript/JS_Define.h" |
16 #include "fpdfsdk/src/javascript/JS_Object.h" | 19 #include "fpdfsdk/src/javascript/JS_Object.h" |
17 | 20 |
18 static const FX_DWORD g_nan[2] = {0, 0x7FF80000}; | 21 static const FX_DWORD g_nan[2] = {0, 0x7FF80000}; |
19 static double GetNan() { | 22 static double GetNan() { |
20 return *(double*)g_nan; | 23 return *(double*)g_nan; |
21 } | 24 } |
22 | 25 |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 for (int i = 0; i < nKeywords; ++i) { | 903 for (int i = 0; i < nKeywords; ++i) { |
901 const wchar_t* property = va_arg(ap, const wchar_t*); | 904 const wchar_t* property = va_arg(ap, const wchar_t*); |
902 v8::Local<v8::Value> v8Value = | 905 v8::Local<v8::Value> v8Value = |
903 FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); | 906 FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); |
904 if (!v8Value->IsUndefined()) | 907 if (!v8Value->IsUndefined()) |
905 result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); | 908 result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); |
906 } | 909 } |
907 va_end(ap); | 910 va_end(ap); |
908 return result; | 911 return result; |
909 } | 912 } |
OLD | NEW |