diff options
author | jochen <jochen@chromium.org> | 2016-06-09 02:51:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-09 02:51:13 -0700 |
commit | 9e077d288016ac796fef18c27cd0851c0a07ff86 (patch) | |
tree | cfc2f2a574ce6125d91658d5cd513b6b05a4e8e3 /testing | |
parent | 23ae4a55bfa8edca1069ac534bfd7c836fcc91ea (diff) | |
download | pdfium-9e077d288016ac796fef18c27cd0851c0a07ff86.tar.xz |
Roll V8 and its deps and update ICU initialization callchromium/2764
R=machenbach@chromium.org,thestig@chromium.org
BUG=
Review-Url: https://codereview.chromium.org/2053603002
Diffstat (limited to 'testing')
-rw-r--r-- | testing/embedder_test.cpp | 2 | ||||
-rw-r--r-- | testing/test_support.cpp | 11 | ||||
-rw-r--r-- | testing/test_support.h | 3 |
3 files changed, 9 insertions, 7 deletions
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp index 3d3b2ad844..59190a7751 100644 --- a/testing/embedder_test.cpp +++ b/testing/embedder_test.cpp @@ -53,7 +53,7 @@ EmbedderTest::EmbedderTest() InitializeV8ForPDFium(g_exe_path_, std::string(), &natives_, &snapshot_, &platform_); #else - InitializeV8ForPDFium(&platform_); + InitializeV8ForPDFium(g_exe_path_, &platform_); #endif // V8_USE_EXTERNAL_STARTUP_DATA #endif // FPDF_ENABLE_V8 } diff --git a/testing/test_support.cpp b/testing/test_support.cpp index c50edeba2d..96a18a547a 100644 --- a/testing/test_support.cpp +++ b/testing/test_support.cpp @@ -58,8 +58,8 @@ bool GetExternalData(const std::string& exe_path, } #endif // V8_USE_EXTERNAL_STARTUP_DATA -void InitializeV8Common(v8::Platform** platform) { - v8::V8::InitializeICU(); +void InitializeV8Common(const char* exe_path, v8::Platform** platform) { + v8::V8::InitializeICUDefaultLocation(exe_path); *platform = v8::platform::CreateDefaultPlatform(); v8::V8::InitializePlatform(*platform); @@ -156,7 +156,7 @@ bool InitializeV8ForPDFium(const std::string& exe_path, v8::StartupData* natives_blob, v8::StartupData* snapshot_blob, v8::Platform** platform) { - InitializeV8Common(platform); + InitializeV8Common(exe_path.c_str(), platform); if (!GetExternalData(exe_path, bin_dir, "natives_blob.bin", natives_blob)) return false; if (!GetExternalData(exe_path, bin_dir, "snapshot_blob.bin", snapshot_blob)) @@ -166,8 +166,9 @@ bool InitializeV8ForPDFium(const std::string& exe_path, return true; } #else // V8_USE_EXTERNAL_STARTUP_DATA -bool InitializeV8ForPDFium(v8::Platform** platform) { - InitializeV8Common(platform); +bool InitializeV8ForPDFium(const std::string& exe_path, + v8::Platform** platform) { + InitializeV8Common(exe_path.c_str(), platform); return true; } #endif // V8_USE_EXTERNAL_STARTUP_DATA diff --git a/testing/test_support.h b/testing/test_support.h index fdb24fe61b..4111ca61ed 100644 --- a/testing/test_support.h +++ b/testing/test_support.h @@ -83,7 +83,8 @@ bool InitializeV8ForPDFium(const std::string& exe_path, v8::StartupData* snapshot_blob, v8::Platform** platform); #else // V8_USE_EXTERNAL_STARTUP_DATA -bool InitializeV8ForPDFium(v8::Platform** platform); +bool InitializeV8ForPDFium(const std::string& exe_path, + v8::Platform** platform); #endif // V8_USE_EXTERNAL_STARTUP_DATA #endif // PDF_ENABLE_V8 |