| 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 "JS_Value.h" |
| 8 |
| 7 #include <time.h> | 9 #include <time.h> |
| 8 #include <cmath> | 10 #include <cmath> |
| 9 #include <limits> | 11 #include <limits> |
| 10 | 12 |
| 11 #include "../../include/javascript/JS_Define.h" | 13 #include "Document.h" |
| 12 #include "../../include/javascript/JS_Object.h" | 14 #include "JS_Define.h" |
| 13 #include "../../include/javascript/JS_Value.h" | 15 #include "JS_Object.h" |
| 14 #include "../../include/javascript/Document.h" | |
| 15 | 16 |
| 16 static const FX_DWORD g_nan[2] = {0, 0x7FF80000}; | 17 static const FX_DWORD g_nan[2] = {0, 0x7FF80000}; |
| 17 static double GetNan() { | 18 static double GetNan() { |
| 18 return *(double*)g_nan; | 19 return *(double*)g_nan; |
| 19 } | 20 } |
| 20 | 21 |
| 21 /* ---------------------------- CJS_Value ---------------------------- */ | 22 /* ---------------------------- CJS_Value ---------------------------- */ |
| 22 | 23 |
| 23 CJS_Value::CJS_Value(v8::Isolate* isolate) | 24 CJS_Value::CJS_Value(v8::Isolate* isolate) |
| 24 : m_eType(VT_unknown), m_isolate(isolate) {} | 25 : m_eType(VT_unknown), m_isolate(isolate) {} |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 return day * 86400000 + time; | 857 return day * 86400000 + time; |
| 857 } | 858 } |
| 858 | 859 |
| 859 bool JS_PortIsNan(double d) { | 860 bool JS_PortIsNan(double d) { |
| 860 return d != d; | 861 return d != d; |
| 861 } | 862 } |
| 862 | 863 |
| 863 double JS_LocalTime(double d) { | 864 double JS_LocalTime(double d) { |
| 864 return JS_GetDateTime() + _getDaylightSavingTA(d); | 865 return JS_GetDateTime() + _getDaylightSavingTA(d); |
| 865 } | 866 } |
| OLD | NEW |