Skip to content

Commit 8b5349a

Browse files
committed
1 parent 9d8f70d commit 8b5349a

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

patches/v8/pdfium.patch

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
2-
index 2f7e5b1f2..22de37800 100644
2+
index 499e70e36..3b943240f 100644
33
--- a/fpdfsdk/fpdf_view.cpp
44
+++ b/fpdfsdk/fpdf_view.cpp
55
@@ -61,6 +61,9 @@
@@ -47,27 +47,22 @@ index 2f7e5b1f2..22de37800 100644
4747
FX_InitializeMemoryAllocators();
4848
CFX_Timer::InitializeGlobals();
4949
CFX_GEModule::Create(config ? config->m_pUserFontPaths : nullptr);
50-
@@ -239,14 +263,12 @@ FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* config) {
50+
@@ -246,11 +270,9 @@ FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* config) {
5151
CPDFXFA_ModuleInit();
5252
#endif // PDF_ENABLE_XFA
5353

5454
- if (config && config->version >= 2) {
5555
- void* platform = config->version >= 3 ? config->m_pPlatform : nullptr;
5656
- IJS_Runtime::Initialize(config->m_v8EmbedderSlot, config->m_pIsolate,
5757
- platform);
58+
- }
5859
+#if PDF_ENABLE_V8
5960
+ IJS_Runtime::Initialize(0, g_isolate, g_platform);
6061
+#endif // PDF_ENABLE_V8
6162

62-
- if (config->version >= 4) {
63-
- SetRendererType(config->m_RendererType);
64-
- }
65-
+ if (config && config->version >= 4) {
66-
+ SetRendererType(config->m_RendererType);
67-
}
68-
g_bLibraryInitialized = true;
69-
}
70-
@@ -274,6 +296,19 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
63+
if (config && config->version >= 4) {
64+
SetRendererType(config->m_RendererType);
65+
@@ -282,6 +304,19 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
7166
CFX_Timer::DestroyGlobals();
7267
FX_DestroyMemoryAllocators();
7368

0 commit comments

Comments
 (0)