OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium 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 #include <limits.h> | 5 #include <limits.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 } | 776 } |
777 | 777 |
778 #ifdef PDF_ENABLE_V8 | 778 #ifdef PDF_ENABLE_V8 |
779 v8::Platform* platform; | 779 v8::Platform* platform; |
780 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 780 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
781 v8::StartupData natives; | 781 v8::StartupData natives; |
782 v8::StartupData snapshot; | 782 v8::StartupData snapshot; |
783 InitializeV8ForPDFium(options.exe_path, options.bin_directory, &natives, | 783 InitializeV8ForPDFium(options.exe_path, options.bin_directory, &natives, |
784 &snapshot, &platform); | 784 &snapshot, &platform); |
785 #else // V8_USE_EXTERNAL_STARTUP_DATA | 785 #else // V8_USE_EXTERNAL_STARTUP_DATA |
786 InitializeV8ForPDFium(&platform); | 786 InitializeV8ForPDFium(options.exe_path, &platform); |
787 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 787 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
788 #endif // PDF_ENABLE_V8 | 788 #endif // PDF_ENABLE_V8 |
789 | 789 |
790 FPDF_LIBRARY_CONFIG config; | 790 FPDF_LIBRARY_CONFIG config; |
791 config.version = 2; | 791 config.version = 2; |
792 config.m_pUserFontPaths = nullptr; | 792 config.m_pUserFontPaths = nullptr; |
793 config.m_pIsolate = nullptr; | 793 config.m_pIsolate = nullptr; |
794 config.m_v8EmbedderSlot = 0; | 794 config.m_v8EmbedderSlot = 0; |
795 | 795 |
796 const char* path_array[2]; | 796 const char* path_array[2]; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 } | 836 } |
837 | 837 |
838 FPDF_DestroyLibrary(); | 838 FPDF_DestroyLibrary(); |
839 #ifdef PDF_ENABLE_V8 | 839 #ifdef PDF_ENABLE_V8 |
840 v8::V8::ShutdownPlatform(); | 840 v8::V8::ShutdownPlatform(); |
841 delete platform; | 841 delete platform; |
842 #endif // PDF_ENABLE_V8 | 842 #endif // PDF_ENABLE_V8 |
843 | 843 |
844 return 0; | 844 return 0; |
845 } | 845 } |
OLD | NEW |