summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/pdfium_test.cc6
-rw-r--r--samples/samples.gyp7
2 files changed, 12 insertions, 1 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index debe033369..7ba85ef308 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -20,6 +20,7 @@
#include "../fpdfsdk/include/fpdfview.h"
#include "../core/include/fxcrt/fx_system.h"
#include "v8/include/v8.h"
+#include "v8/include/libplatform/libplatform.h"
#ifdef _WIN32
#define snprintf _snprintf
@@ -497,6 +498,9 @@ int main(int argc, const char* argv[]) {
}
v8::V8::InitializeICU();
+ v8::Platform* platform = v8::platform::CreateDefaultPlatform();
+ v8::V8::InitializePlatform(platform);
+ v8::V8::Initialize();
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
v8::StartupData natives;
@@ -530,6 +534,8 @@ int main(int argc, const char* argv[]) {
}
FPDF_DestroyLibrary();
+ v8::V8::ShutdownPlatform();
+ delete platform;
return 0;
}
diff --git a/samples/samples.gyp b/samples/samples.gyp
index 0c8ee93661..607a5b9169 100644
--- a/samples/samples.gyp
+++ b/samples/samples.gyp
@@ -7,8 +7,13 @@
'type': 'executable',
'dependencies': [
'../pdfium.gyp:pdfium',
+ '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
+ ],
+ 'include_dirs': [
+ '<(DEPTH)',
+ '<(DEPTH)/v8',
+ '<(DEPTH)/v8/include',
],
- 'include_dirs': ['<(DEPTH)'],
},
'targets': [
{