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

Unified Diff: samples/pdfium_test.cc

Issue 887073005: Merge https://codereview.chromium.org/897973002/ and https://codereview.chromium.org/902753002/ to … (Closed) Base URL: https://pdfium.googlesource.com/pdfium@xfa
Patch Set: Created 5 years, 10 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
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;
}
« no previous file with comments | « samples/BUILD.gn ('k') | samples/samples.gyp » ('j') | xfa/src/fxjse/src/runtime.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698