| 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 "../../../core/include/fxcrt/fx_basic.h" | 7 #include "../../../core/include/fxcrt/fx_basic.h" |
| 8 #include "../../../core/include/fxcrt/fx_ext.h" | 8 #include "../../../core/include/fxcrt/fx_ext.h" |
| 9 #include "../../include/jsapi/fxjs_v8.h" | 9 #include "../../include/jsapi/fxjs_v8.h" |
| 10 #include "../../include/fsdk_define.h" | 10 #include "../../include/fsdk_define.h" |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 { | 628 { |
| 629 if(pArray.IsEmpty()) return 0; | 629 if(pArray.IsEmpty()) return 0; |
| 630 if (pArray->Set(pJSRuntime->GetCurrentContext(), index, pValue).IsNothin
g()) return 0; | 630 if (pArray->Set(pJSRuntime->GetCurrentContext(), index, pValue).IsNothin
g()) return 0; |
| 631 return 1; | 631 return 1; |
| 632 } | 632 } |
| 633 | 633 |
| 634 v8::Local<v8::Value> JS_GetArrayElement(IJS_Runtime* pJSRuntime, v8::Local<v8::A
rray> pArray,unsigned index) | 634 v8::Local<v8::Value> JS_GetArrayElement(IJS_Runtime* pJSRuntime, v8::Local<v8::A
rray> pArray,unsigned index) |
| 635 { | 635 { |
| 636 if(pArray.IsEmpty()) return v8::Local<v8::Value>(); | 636 if(pArray.IsEmpty()) return v8::Local<v8::Value>(); |
| 637 v8::Local<v8::Value> val; | 637 v8::Local<v8::Value> val; |
| 638 » if (pArray->Get(pJSRuntime->GetCurrentContext(), index).ToLocal(&val)) r
eturn v8::Local<v8::Value>(); | 638 » if (!pArray->Get(pJSRuntime->GetCurrentContext(), index).ToLocal(&val))
return v8::Local<v8::Value>(); |
| 639 return val; | 639 return val; |
| 640 } | 640 } |
| 641 | 641 |
| 642 unsigned JS_GetArrayLength(v8::Local<v8::Array> pArray) | 642 unsigned JS_GetArrayLength(v8::Local<v8::Array> pArray) |
| 643 { | 643 { |
| 644 if(pArray.IsEmpty()) return 0; | 644 if(pArray.IsEmpty()) return 0; |
| 645 return pArray->Length(); | 645 return pArray->Length(); |
| 646 } | 646 } |
| 647 | 647 |
| 648 v8::Local<v8::Value> JS_NewNumber(IJS_Runtime* pJSRuntime,int number) | 648 v8::Local<v8::Value> JS_NewNumber(IJS_Runtime* pJSRuntime,int number) |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 { | 1060 { |
| 1061 return d != d; | 1061 return d != d; |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 double JS_LocalTime(double d) | 1064 double JS_LocalTime(double d) |
| 1065 { | 1065 { |
| 1066 return JS_GetDateTime() + _getDaylightSavingTA(d); | 1066 return JS_GetDateTime() + _getDaylightSavingTA(d); |
| 1067 } | 1067 } |
| 1068 | 1068 |
| 1069 //JavaScript time implement End. | 1069 //JavaScript time implement End. |
| OLD | NEW |