Merge to XFA: Allow compiling PDFium without V8.
Original Review URL: https://codereview.chromium.org/1395733006 .
(cherry picked from commit f1c713663192368d26031a4caed1f9705f4510af)
Conflicts:
BUILD.gn
fpdfsdk/src/fpdfview.cpp
fpdfsdk/src/javascript/JS_Runtime.cpp
pdfium.gyp
samples/BUILD.gn
samples/samples.gyp
BUG=pdfium:211
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1393833006 .
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index 8a0d666..1d2fa84 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -33,6 +33,11 @@
v8::Global<v8::ObjectTemplate>& _getGlobalObjectTemplate(v8::Isolate* pIsolate);
// static
+void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {
+ FXJS_Initialize(slot, reinterpret_cast<v8::Isolate*>(isolate));
+}
+
+// static
IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) {
return new CJS_Runtime(pEnv);
}