Index: samples/pdfium_test.cc |
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc |
index f7911c36b93ca3186722f1cb46c6914b201d1b99..c351e399795ca05db136c98d0679412e13d04804 100644 |
--- a/samples/pdfium_test.cc |
+++ b/samples/pdfium_test.cc |
@@ -21,6 +21,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 |
@@ -514,6 +515,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; |
@@ -547,6 +551,8 @@ int main(int argc, const char* argv[]) { |
} |
FPDF_DestroyLibrary(); |
+ v8::V8::ShutdownPlatform(); |
+ delete platform; |
return 0; |
} |