diff options
Diffstat (limited to 'testing/test_support.cpp')
-rw-r--r-- | testing/test_support.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/testing/test_support.cpp b/testing/test_support.cpp index 96a18a547a..c4d915e900 100644 --- a/testing/test_support.cpp +++ b/testing/test_support.cpp @@ -157,12 +157,14 @@ bool InitializeV8ForPDFium(const std::string& exe_path, v8::StartupData* snapshot_blob, v8::Platform** 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)) - return false; - v8::V8::SetNativesDataBlob(natives_blob); - v8::V8::SetSnapshotDataBlob(snapshot_blob); + if (natives_blob && snapshot_blob) { + if (!GetExternalData(exe_path, bin_dir, "natives_blob.bin", natives_blob)) + return false; + if (!GetExternalData(exe_path, bin_dir, "snapshot_blob.bin", snapshot_blob)) + return false; + v8::V8::SetNativesDataBlob(natives_blob); + v8::V8::SetSnapshotDataBlob(snapshot_blob); + } return true; } #else // V8_USE_EXTERNAL_STARTUP_DATA |