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

Unified Diff: samples/pdfium_test.cc

Issue 897973002: Initialize V8 outside of PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
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
« no previous file with comments | « pdfium.gyp ('k') | samples/samples.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/pdfium_test.cc
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index debe033369762d6ba51e45150577a9a2abb1d315..7ba85ef3081851ae182d9bc9518c2258f0a8bff6 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();
Will Harris 2015/02/04 23:56:45 is a V8:Dispose() needed here?
jam 2015/02/04 23:59:07 no idea, i'm just moving code from the other file
+ v8::V8::ShutdownPlatform();
+ delete platform;
return 0;
}
« no previous file with comments | « pdfium.gyp ('k') | samples/samples.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698