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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 JS_FreePrivate(pObj); | 302 JS_FreePrivate(pObj); |
303 } | 303 } |
304 delete pObjDef; | 304 delete pObjDef; |
305 } | 305 } |
306 delete pArray; | 306 delete pArray; |
307 isolate->SetData(0,NULL); | 307 isolate->SetData(0,NULL); |
308 } | 308 } |
309 | 309 |
310 void JS_Initial() | 310 void JS_Initial() |
311 { | 311 { |
312 #ifndef FOXIT_CHROME_BUILD | |
313 v8::V8::InitializeICU(); | |
314 #endif | |
315 } | 312 } |
316 void JS_Release() | 313 void JS_Release() |
317 { | 314 { |
318 | 315 |
319 } | 316 } |
320 int JS_Parse(IJS_Runtime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t*
script, long length, FXJSErr* perror) | 317 int JS_Parse(IJS_Runtime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t*
script, long length, FXJSErr* perror) |
321 { | 318 { |
322 v8::Isolate* isolate = (v8::Isolate*)pJSRuntime; | 319 v8::Isolate* isolate = (v8::Isolate*)pJSRuntime; |
323 v8::Isolate::Scope isolate_scope(isolate); | 320 v8::Isolate::Scope isolate_scope(isolate); |
324 v8::TryCatch try_catch; | 321 v8::TryCatch try_catch; |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 { | 1031 { |
1035 return d != d; | 1032 return d != d; |
1036 } | 1033 } |
1037 | 1034 |
1038 double JS_LocalTime(double d) | 1035 double JS_LocalTime(double d) |
1039 { | 1036 { |
1040 return JS_GetDateTime() + _getDaylightSavingTA(d); | 1037 return JS_GetDateTime() + _getDaylightSavingTA(d); |
1041 } | 1038 } |
1042 | 1039 |
1043 //JavaScript time implement End. | 1040 //JavaScript time implement End. |
OLD | NEW |