Index: testing/test_support.cpp |
diff --git a/testing/test_support.cpp b/testing/test_support.cpp |
index 96a18a547a10aa0e4dbd47220fe0523624133c72..c4d915e900422e150776bb9254af85f57e54eb6b 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 |