summaryrefslogtreecommitdiffstats
path: root/content/app/content_main_runner.cc
diff options
context:
space:
mode:
authorrmcilroy <rmcilroy@chromium.org>2015-01-09 03:31:22 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-09 11:32:12 +0000
commitda69cd0f7c2f92640b7d00e59f66eb3b9fabba2e (patch)
tree27214eb143b0898348defb783b8cd2e7f0337658 /content/app/content_main_runner.cc
parent712f1acaf22f225a5eaef28b3dff9aecb7bc5cc8 (diff)
downloadchromium_src-da69cd0f7c2f92640b7d00e59f66eb3b9fabba2e.zip
chromium_src-da69cd0f7c2f92640b7d00e59f66eb3b9fabba2e.tar.gz
chromium_src-da69cd0f7c2f92640b7d00e59f66eb3b9fabba2e.tar.bz2
[gin] Fingerprint the V8 snapshot files on Windows and verify before loading the snapshot.
Adds code which generates a SHA256 fingerprint of the external V8 snapshot blob files during the build process, and embeds these values into the binary. During startup the SHA256 hash of the snapshot blobs are compared against these fingerprints and Chrome will fail to load if they differ. BUG=421063,439661 Review URL: https://codereview.chromium.org/832393003 Cr-Commit-Position: refs/heads/master@{#310755}
Diffstat (limited to 'content/app/content_main_runner.cc')
-rw-r--r--content/app/content_main_runner.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 05e45bd..2da7dc1 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -721,7 +721,7 @@ class ContentMainRunnerImpl : public ContentMainRunner {
else
CHECK(base::i18n::InitializeICU());
-#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
int v8_natives_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(
kV8NativesDataDescriptor);
int v8_snapshot_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(
@@ -736,10 +736,10 @@ class ContentMainRunnerImpl : public ContentMainRunner {
#else
CHECK(base::i18n::InitializeICU());
-#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
CHECK(gin::IsolateHolder::LoadV8Snapshot());
-#endif // V8_USE_EXTERNAL_STARTUP_DATA
-#endif // OS_ANDROID
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
+#endif // OS_ANDROID
InitializeStatsTable(command_line);