summaryrefslogtreecommitdiff
path: root/testing/embedder_test_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/embedder_test_main.cpp')
-rw-r--r--testing/embedder_test_main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/testing/embedder_test_main.cpp b/testing/embedder_test_main.cpp
index 0c3ceb60ce..ade6118e64 100644
--- a/testing/embedder_test_main.cpp
+++ b/testing/embedder_test_main.cpp
@@ -34,16 +34,16 @@ class Environment : public testing::Environment {
#ifdef PDF_ENABLE_V8
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
if (g_v8_natives && g_v8_snapshot) {
- platform_ = InitializeV8ForPDFiumWithStartupData(
- g_exe_path, std::string(), nullptr, nullptr);
+ InitializeV8ForPDFium(g_exe_path, std::string(), nullptr, nullptr,
+ &platform_);
} else {
g_v8_natives = new v8::StartupData;
g_v8_snapshot = new v8::StartupData;
- platform_ = InitializeV8ForPDFiumWithStartupData(
- g_exe_path, std::string(), g_v8_natives, g_v8_snapshot);
+ InitializeV8ForPDFium(g_exe_path, std::string(), g_v8_natives,
+ g_v8_snapshot, &platform_);
}
#else
- platform_ = InitializeV8ForPDFium(g_exe_path);
+ InitializeV8ForPDFium(g_exe_path, &platform_);
#endif // V8_USE_EXTERNAL_STARTUP_DATA
#endif // FPDF_ENABLE_V8
}
@@ -51,12 +51,13 @@ class Environment : public testing::Environment {
void TearDown() override {
#ifdef PDF_ENABLE_V8
v8::V8::ShutdownPlatform();
+ delete platform_;
#endif // PDF_ENABLE_V8
}
private:
#ifdef PDF_ENABLE_V8
- std::unique_ptr<v8::Platform> platform_;
+ v8::Platform* platform_;
#endif // PDF_ENABLE_V8
};