Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: fpdfsdk/src/fpdfview.cpp

Issue 1391843004: Add some preprocessor directives to allow compiling without V8. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview.cpp
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 0bf6426b66fb2e8aaac3bdb71188ec5aaa3f5e61..dc93fd38c0c74651aa241e2f96aa67ea8528cc52 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -14,7 +14,9 @@
#include "../include/fsdk_define.h"
#include "../include/fsdk_mgr.h"
#include "../include/fsdk_rendercontext.h"
+#ifndef DISABLE_V8
#include "../include/jsapi/fxjs_v8.h"
+#endif // DISABLE_V8
CPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess) {
if (pFileAccess)
@@ -110,10 +112,12 @@ DLLEXPORT void STDCALL FPDF_InitLibraryWithConfig(
pModuleMgr->LoadEmbeddedCNS1CMaps();
pModuleMgr->LoadEmbeddedKorea1CMaps();
}
+#ifndef DISABLE_V8
if (cfg && cfg->version >= 2) {
FXJS_Initialize(cfg->m_v8EmbedderSlot,
reinterpret_cast<v8::Isolate*>(cfg->m_pIsolate));
}
+#endif // DISABLE_V8
}
DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
« no previous file with comments | « no previous file | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698