Chromium Code Reviews| 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; |
| } |